The ads.txt File Explained
How a simple text file helps prevent unauthorized resale of a publisher's ad inventory.
Core Concept
ads.txt (Authorized Digital Sellers) is a standardized text file, published at a publisher's domain root, that declares which companies are authorized to sell that publisher's ad inventory.
It was created specifically to combat unauthorized inventory resale and domain spoofing in programmatic advertising, where fraudulent sellers claim to represent inventory they don't actually control.
How ads.txt Prevents Fraud
The file gives advertisers and ad exchanges a way to cross-check inventory claims against a single authoritative source.
- Publisher declares authorized sellers directly in a public file
- Ad exchanges check seller claims against the file before transacting
- Unauthorized resale attempts become detectable and rejectable
Domain Spoofing Defense
ads.txt specifically addresses domain spoofing, where a fraudulent seller claims to offer inventory from a premium publisher's domain that they don't actually control.
File Format and Location
Like security.txt and robots.txt, ads.txt follows a simple, standardized location and format convention.
- Published at the domain root, e.g. example.com/ads.txt
- Each line lists an authorized ad system, publisher account ID, and relationship type
- Plain text format, easily generated and updated
Why AdSense Publishers Need It
For publishers running AdSense alongside other demand sources, a correctly configured ads.txt file is essential for maximizing legitimate fill and revenue.
Many advertisers and ad exchanges now refuse to bid on inventory that isn't properly declared in the publisher's ads.txt file.
Bid Participation Requirement
Increasingly, ad exchanges simply won't bid on inventory unless it's properly authorized in the publisher's ads.txt file, making it a revenue-relevant, not just protective, measure.
Maintaining an Accurate ads.txt File
Keeping the file current requires attention whenever ad partnerships change.
- Add new authorized sellers as new ad partnerships are established
- Remove entries for partnerships that have ended
- Verify formatting matches each partner's specific published requirements
Real-World Implementation
ads.txt has become a standard, expected part of publisher ad stack configuration.
- Ad networks providing exact ads.txt lines for publishers to add
- Programmatic advertising platforms enforcing ads.txt compliance before bidding
- Publisher CMS platforms offering built-in ads.txt management tools
For any publisher running programmatic advertising alongside AdSense, a correctly maintained ads.txt file is a foundational, revenue-protecting piece of configuration.
Common Mistakes to Avoid
A few common mistakes cause ads.txt configuration issues.
- Leaving the ads.txt file outdated after adding or removing ad partnerships.
- Manually reconstructing partner lines instead of copying the exact required format.
- Assuming ads.txt is optional now that it's become an established industry standard.
- Overlooking that incomplete entries can prevent legitimate partners from bidding.
- Failing to verify the file is correctly published at the domain root.
- Overlooking app-ads.txt, the mobile app equivalent of the standard web ads.txt file.
- Assuming a single incorrect line in ads.txt only affects that one specific partner.
- Failing to validate the file's format using available validation tools before publishing.
- Overlooking that subdomains may need their own ads.txt file depending on hosting setup.
- Assuming ads.txt errors are immediately obvious without dedicated monitoring.
- Failing to coordinate ads.txt updates when onboarding a new advertising partner.
- Overlooking that some multi-domain sites need a consistent ads.txt strategy across all properties.
Best Practices Checklist
These practices keep ads.txt accurate and effective over time.
- Update ads.txt promptly whenever ad partnerships are added or removed.
- Copy each network's exact published line format rather than reconstructing it manually.
- Verify the file is correctly published and accessible at the domain root.
- Treat ads.txt maintenance as an ongoing task tied to ad stack changes.
- Audit the file periodically to catch stale or missing entries.
- Publish app-ads.txt as well if operating mobile apps alongside a website.
- Validate the entire ads.txt file carefully, since errors can have broader unintended effects.
- Use available validation tools to check formatting before publishing changes.
- Check whether subdomains require their own ads.txt file based on your specific hosting configuration.
- Set up dedicated monitoring for ads.txt errors, since they aren't always immediately obvious.
- Coordinate ads.txt updates as a standard step whenever onboarding a new advertising partner.
- Maintain a consistent ads.txt strategy across all domains within a multi-site publisher network.
Frequently Asked Questions
Frequently asked questions about the ads.txt file.
What problem does ads.txt solve?
It combats unauthorized inventory resale and domain spoofing by letting publishers declare which companies are authorized to sell their ad inventory.
Where should ads.txt be published?
At the domain root, such as example.com/ads.txt, following the same standardized location convention as files like security.txt.
What happens if my ads.txt file is outdated?
Legitimate ad partners may be unable to sell inventory correctly, directly reducing potential revenue from that demand source.
Do ad exchanges actually check ads.txt before bidding?
Increasingly yes — many now refuse to bid on inventory that isn't properly declared in the publisher's ads.txt file.
Is ads.txt only relevant for large publishers?
No — any publisher running programmatic advertising alongside AdSense benefits from a correctly maintained ads.txt file, regardless of size.
Is there an equivalent to ads.txt for mobile apps?
Yes — app-ads.txt serves the same authorization purpose specifically for mobile app inventory, hosted on the app developer's website.
Can one incorrect line in ads.txt cause broader problems?
Potentially — a malformed line can sometimes affect how the entire file is parsed, so careful validation matters.
Are there tools to validate an ads.txt file before publishing?
Yes — several free validation tools check for formatting errors and missing required fields before a file goes live.
Do subdomains need a separate ads.txt file?
It depends on hosting configuration — some setups require subdomain-specific files, which is worth verifying for your particular architecture.
Are ads.txt errors easy to notice without dedicated monitoring?
Not necessarily — errors can silently reduce fill rates without an obvious symptom, making dedicated monitoring genuinely valuable.
Do multi-domain publishers need a coordinated ads.txt approach?
Yes — maintaining consistency across properties helps ensure every domain properly authorizes its actual advertising partners.
Check ads.txt Configuration
Run an AdSense approval check to verify your site's ads.txt file is properly configured.
Launch Tool →