Ads.txt Explained: Why Every Publisher Needs It and How to Set It Up
What Is Ads.txt and Why Should You Care
Ads.txt stands for Authorized Digital Sellers, and it is a simple text file that lives on your website's root domain. Despite its simplicity, ads.txt is one of the most important files on your site for protecting your ad revenue and ensuring you receive full payment for your inventory. Without a properly configured ads.txt file, you may be losing revenue to fraud, your inventory may be undervalued by advertisers, and some demand sources may refuse to bid on your impressions entirely.
The IAB Tech Lab introduced ads.txt in 2017 to combat a specific type of ad fraud called domain spoofing. In domain spoofing, fraudsters create counterfeit ad inventory and sell it to advertisers as if it belongs to legitimate publishers. An advertiser thinks they are buying impressions on your popular food blog, but the impressions are actually being served on a fraudulent site. You receive no revenue, the advertiser wastes their budget, and the fraudster pockets the difference.
Ads.txt prevents this by giving publishers a way to publicly declare which companies are authorized to sell their inventory. When an advertiser's DSP sees an impression for sale claiming to be from your domain, it checks your ads.txt file to verify that the seller is listed as an authorized partner. If the seller is not in your ads.txt, the DSP can refuse to bid, protecting both the advertiser and your legitimate inventory from devaluation.
How Ads.txt Works Technically
The ads.txt file is a plain text file placed at the root of your domain, accessible at yourdomain.com/ads.txt. Advertisers, DSPs, and ad exchanges automatically crawl this URL to retrieve your authorized seller list. The file format is standardized by the IAB, with each line containing a single seller authorization record.
Each record contains four fields separated by commas. The first field is the domain of the advertising system, such as google.com for Google AdSense or AdX. The second field is your publisher account ID within that system. The third field indicates the relationship type, either DIRECT if you have a direct business relationship with the advertising system, or RESELLER if a third party sells your inventory through that system. The fourth field is an optional certification authority ID that further validates the seller's identity.
For example, a basic ads.txt entry for Google AdSense looks like this: google.com, pub-1234567890, DIRECT, f08c47fec0942fa0. This tells the programmatic ecosystem that Google is authorized to sell ads on your behalf, your publisher ID is pub-1234567890, you have a direct relationship with Google, and Google's certification authority ID is f08c47fec0942fa0.
When you use an ad network like Mediavine or Raptive, your ads.txt contains both your direct entries and the network's reseller entries. The network sells your inventory through multiple SSPs and exchanges, each of which needs to be listed as an authorized reseller. A typical publisher working with a premium ad network has 50 to 200 entries in their ads.txt file covering all the demand paths their network uses.
Revenue Impact of Ads.txt
The revenue impact of ads.txt is both protective and generative. On the protective side, ads.txt prevents unauthorized sellers from siphoning revenue that should flow to you. Without ads.txt, fraudsters can create counterfeit versions of your inventory and sell it at lower prices, effectively competing against your legitimate inventory and driving down the market price for impressions on your domain.
On the generative side, many major DSPs and advertisers now require ads.txt verification before bidding on inventory. Google's own buying platforms, Amazon DSP, The Trade Desk, and other major buyers check ads.txt as part of their bid evaluation process. If your ads.txt is missing, misconfigured, or outdated, these buyers may reduce their bids or refuse to bid entirely. Some estimates suggest that publishers without proper ads.txt files lose 10 to 30 percent of potential demand.
The effect is cumulative. Each demand source that refuses to bid due to missing ads.txt authorization reduces competition in your auctions. Less competition means lower winning bid prices. Lower prices across millions of impressions add up to significant annual revenue loss. For a publisher earning $5,000 per month, a 15 percent demand reduction from ads.txt issues could cost $750 monthly or $9,000 annually.
Premium ad networks require properly configured ads.txt as a condition of participation. Mediavine, Raptive, and other major networks provide their publishers with the exact ads.txt entries to include. Failure to implement these entries correctly can result in reduced fill rates, lower CPMs, or even removal from the network.
Creating Your Ads.txt File
Creating an ads.txt file is straightforward, but accuracy is critical. An incorrect publisher ID, wrong relationship type, or missing entry can cause demand partners to stop bidding on your inventory.
Step one: Collect your entries. Each ad network and demand partner you work with will provide their required ads.txt entries. Check your ad network's publisher dashboard or support documentation for their current ads.txt requirements. Google provides AdSense and Ad Manager entries in your account settings. Mediavine, Raptive, and other networks typically have a dedicated ads.txt page or document for their publishers.
Step two: Create the file. Using a plain text editor like Notepad, VS Code, or Sublime Text, create a new file named ads.txt. Do not use a word processor like Microsoft Word, as it may add invisible formatting characters that corrupt the file. Paste all your collected entries into the file, one entry per line. You can add comment lines starting with a hash symbol to organize the entries by source.
Step three: Upload to your root domain. The file must be accessible at the exact URL yourdomain.com/ads.txt. Upload it to your web server's root directory, the same directory that contains your homepage. If you use WordPress, you can place it in the root of your WordPress installation. Some WordPress plugins also manage ads.txt through the admin dashboard.
Step four: Verify the file. After uploading, navigate to yourdomain.com/ads.txt in your browser to confirm it loads correctly. The file should display as plain text with your authorization entries. Check that the content type header is text/plain, not text/html. Some server configurations incorrectly serve text files with HTML content types, which can prevent proper parsing.
Use the IAB's ads.txt validation tool or third-party validators to check your file for formatting errors, duplicate entries, or other issues. These tools compare your entries against known advertising systems and flag any discrepancies that could affect demand.
Common Ads.txt Mistakes
Missing entries are the most common and most costly mistake. Every demand partner in your monetization stack needs to be represented in your ads.txt. If you add a new ad network or your existing network adds new demand partners, your ads.txt must be updated to include them. Outdated files that lack current partner entries cause those partners' bids to be rejected by advertisers.
Wrong publisher IDs invalidate the affected entries. Copy publisher IDs exactly from your network's documentation rather than typing them manually. A single digit error in a publisher ID means that entry is effectively non-existent, and the corresponding demand partner cannot sell your inventory.
Incorrect relationship types misrepresent your business relationships. Use DIRECT only for advertising systems where you have a direct account. Use RESELLER for systems that access your inventory through an intermediary like your ad network. Your ad network provides entries marked as RESELLER because they resell your inventory through these systems on your behalf.
File encoding issues can render your ads.txt unreadable by automated crawlers. Save the file with UTF-8 encoding without a byte order mark. Avoid copying entries from PDF documents or formatted web pages, as invisible characters may be included. If your file validates incorrectly despite looking correct in a text editor, re-create it from scratch in a plain text editor.
Subdomain confusion causes problems for publishers who serve content from subdomains. The ads.txt specification requires the file at the root domain. If your site is blog.yourdomain.com, the ads.txt must be at yourdomain.com/ads.txt, not blog.yourdomain.com/ads.txt. However, you can reference the root domain's ads.txt from a subdomain using a subdomain-specific mechanism called the referral specification.
Stale entries accumulate when publishers switch ad networks without removing old entries. While extra entries do not directly reduce revenue, a cluttered ads.txt with entries for networks you no longer use signals poor maintenance to sophisticated buyers. Clean up your file whenever you change ad network partnerships.
Maintaining Your Ads.txt Over Time
Ads.txt is not a set-and-forget file. The programmatic ecosystem evolves continuously, with demand partners adding new systems, changing account structures, and updating certification IDs. Your ads.txt must evolve with it.
Set a quarterly reminder to review and update your ads.txt file. Check with each of your ad network partners for any updates to their required entries. Compare your current file against their latest documentation and add any new entries, remove any deprecated ones, and verify that existing entries remain accurate.
When you switch ad networks, update your ads.txt immediately. Remove the old network's entries and add the new network's entries before or simultaneously with the technical integration changeover. Running with incorrect ads.txt during a network transition can cause significant revenue loss during the critical first weeks when the new network's algorithms are still optimizing for your site.
Monitor your ads.txt for unauthorized modifications. If someone gains access to your server and alters your ads.txt, they could redirect your ad revenue to their accounts. Include ads.txt in your security monitoring and review it whenever you detect any unauthorized changes to your website files.
Ads.txt for App Publishers: App-ads.txt
If you publish mobile apps in addition to websites, the equivalent file for app inventory is app-ads.txt. It follows the same format and purpose as ads.txt but authorizes sellers of your in-app advertising inventory. The file is placed on the developer website listed in your app store listing, at developerwebsite.com/app-ads.txt.
App-ads.txt is particularly important because app inventory fraud has historically been even more prevalent than web inventory fraud. Major app advertising platforms require app-ads.txt for their sellers, and DSPs increasingly refuse to bid on app inventory without it.
Beyond Ads.txt: Sellers.json and the Transparency Chain
Ads.txt is one component of a broader transparency ecosystem. Sellers.json, maintained by SSPs and exchanges, complements ads.txt by providing information about the sellers in the programmatic chain. While ads.txt declares who is authorized to sell your inventory, sellers.json confirms the identity and business details of those sellers.
Together, ads.txt and sellers.json create a verifiable chain of authorization from publisher to buyer. Advertisers can trace each impression back through the supply chain, verifying at each step that the seller is authorized and legitimate. This transparency reduces fraud, increases advertiser confidence, and supports higher CPMs for publishers who participate fully in the transparency ecosystem.
Ensuring your ads.txt is complete and accurate is one of the simplest yet most impactful actions you can take to protect and increase your ad revenue. Tools like AdGateScore can verify that your ads.txt is properly configured and identify any issues that might be reducing your demand. Combined with quality content, strong traffic, and optimized ad placements, a well-maintained ads.txt file ensures you capture the full value of every impression your site generates.