Home / Guides / Advanced ads.txt

ads.txt for subdomains: where the file should go

By the ads-txt.in team · Published November 8, 2026

If your content lives on a subdomain such as blog.example.com or news.example.com, it is natural to wonder where ads.txt belongs. The short answer: on the root domain, with an optional pointer for subdomains that need their own file.

Crawlers start at the root domain

Under the ads.txt standard, ad systems look for the file at the root of the domain, such as https://example.com/ads.txt, and apply it to the root domain and its subdomains. So the simplest setup is a single file on the root domain that lists every seller authorised for the root and all subdomains.

Google’s AdSense help also asks publishers to place ads.txt on the root domain, even when the ads appear on a subdomain.

When a subdomain needs its own file

Sometimes a subdomain is run by a different team, or works with different ad partners. In that case:

  1. Put an ads.txt file on the subdomain, for example https://news.example.com/ads.txt.
  2. In the root domain’s file, add a line pointing to it:
SUBDOMAIN=news.example.com

This tells crawlers that the subdomain has its own file worth reading.

What if I do not control the root domain?

Free subdomains on shared platforms, such as a site at yourname.someplatform.com, depend on the platform owner’s root file. Many platforms provide their own ads.txt setting, like Blogger’s custom ads.txt option. If yours does not, you may not be able to add ads.txt at all, which is one reason serious publishers move to their own domain.

Check both levels

Use our ads.txt checker on the root domain, and on the subdomain if it has its own file. Make sure the root file is reachable without errors, because crawlers start there.

Related guides