Every publisher monetizing a website with Google AdSense will eventually encounter the dreaded dashboard warning: "Earnings at risk – You need to fix some ads.txt file issues to avoid severe impact to your revenue." While simple in concept, improper configuration of this single plain text file is one of the most common causes of silent revenue drops, suppressed advertising bids, and publisher disqualifications.
The ads.txt (Authorized Digital Sellers) standard is an open-source technical specification developed by the IAB Technology Laboratory. Its primary purpose is to eliminate domain spoofing, arbitrary ad injection, and unauthorized reseller arbitrage in programmatic ad exchanges.
In this technical manual, we explain the mechanics of ads.txt, dissect the 4-part Google AdSense entry format, examine HTTP routing and subdomain rules, walk through root server deployment, and provide a troubleshooting framework to resolve crawl delays.
1. What is ads.txt and Why Does It Exist?
Prior to the introduction of the ads.txt standard, the digital advertising ecosystem suffered billions of dollars in programmatic fraud through domain spoofing and counterfeit ad inventory. Malicious actors would manipulate RTB (Real-Time Bidding) bid requests to claim that their impressions originated from high-authority media domains (e.g., premium news publishers or reputable utility portals) when the actual clicks occurred on bot-driven spam hubs.
Advertisers were tricked into paying top-tier CPM prices for illegitimate impressions, while legitimate publishers were robbed of revenue. In response, the IAB Tech Lab created Authorized Digital Sellers (ads.txt).
By hosting a publicly crawlable plain text file at your root domain, you provide programmatic buyers (Demand Side Platforms, or DSPs like Google Display & Video 360, The Trade Desk, Amazon DSP) with an immutable cryptographic ledger verifying whether the ad exchange attempting to sell an impression on your domain actually holds legitimate authorization.
Audit Your ads.txt & Policy Health in Real Time
Use our automated pre-application diagnostic scanner to test root accessibility, MIME type headers, publisher ID match, and full AdSense compliance.
Launch AdSense Approval Checker →2. The Anatomy of an AdSense ads.txt Record
An ads.txt file consists of plain text lines formatted with comma-separated values (CSV). For Google AdSense, the standard entry contains four distinct components:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
Let us examine each field in technical detail:
Field 1: Domain Name of the Advertising System
google.com – This specifies the canonical domain of the ad exchange or supply-side platform (SSP). For Google AdSense and Google Ad Manager, this value must always be written in lowercase as google.com.
Field 2: Publisher's Account Identifier
pub-XXXXXXXXXXXXXXXX – This is your unique 16-digit publisher ID assigned inside your Google AdSense account console (found under Account > Settings > Account Information). You must include the full pub- prefix followed by the 16 numeric digits. Omitting the prefix or making a single digit typo prevents verification.
Field 3: Supply Chain Relationship Type
DIRECT or RESELLER – This defines your commercial relationship with the ad network:
- DIRECT: You personally own and manage the AdSense account associated with Field 2. For individual website owners and direct publishers, this should always be set to
DIRECT. - RESELLER: An intermediary or third-party ad monetization agency manages your ad inventory on their own master account.
Field 4: Certification Authority ID
f08c47fec0942fa0 – This is the unique Trustworthy Accountability Group (TAG) ID assigned to Google LLC. While Field 4 is technically optional under IAB syntax, Google strongly recommends including it to maximize DSP buyer trust and bid rates.
3. How to Create and Deploy Your ads.txt File
Deploying your ads.txt file takes only a few minutes across different web hosting environments. Follow these step-by-step instructions:
Method A: Static HTML / Custom Server (Apache, Nginx, Netlify, Vercel)
- Create a new plain text file named exactly
ads.txt(all lowercase). - Paste your formatted line:
google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, f08c47fec0942fa0. - Upload
ads.txtinto your public web root directory (e.g.,/public_html/,/var/www/html/, or/public/). - Ensure the file permissions are set to
644(readable by world/crawlers).
Method B: WordPress Sites
- Install a lightweight ads.txt manager plugin (such as Ads.txt Manager) or place the file directly inside your WordPress root directory via cPanel File Manager or SFTP.
- Paste your AdSense entry into the plugin editor and save changes.
- Purge any server-side caching plugins (WP Rocket, LiteSpeed Cache, Cloudflare) to ensure immediate public delivery.
4. Root Domain Accessibility & Subdomain Routing Rules
IAB Tech Lab specifications enforce rigid rules regarding URL endpoints, HTTP redirects, and subdomains:
- Root Domain Requirement: The ads.txt crawler always looks for the file at the top-level domain:
https://example.com/ads.txt. - Subdomain Delegation: If you run a multi-site network or serve ads on a subdomain (e.g.,
app.example.comorblog.example.com), the crawler will query the root domain first. If you need subdomain-specific sellers, you can declare delegation in the root file using:subdomain=blog.example.com - HTTP to HTTPS Redirects: Crawlers will follow standard 301 and 302 HTTP redirects, but you must not exceed 5 redirect hops. Ensure your redirect terminates on a valid
HTTP 200 OKresponse. - MIME Type: The web server must serve the file with the header
Content-Type: text/plain. Serving ads.txt withtext/htmlorapplication/octet-streamtriggers crawler parse failures.
5. Troubleshooting & Fixing "Earnings at Risk" Warnings
If your Google AdSense account displays an "Earnings at risk" warning or fails to find your ads.txt file, follow this diagnostic checklist:
| Issue Symptoms | Root Cause | Step-by-Step Fix |
|---|---|---|
| HTTP 404 Not Found | File placed in subfolder or mistyped filename | Move file to root folder (e.g. /public_html/) and ensure name is lowercase ads.txt. |
| Robots.txt Blocking | Disallow: / blocking crawler access | Add User-agent: * Allow: /ads.txt explicitly to your robots.txt. |
| Publisher ID Typo | Missing pub- prefix or copied incorrect number | Copy exact ID from AdSense Settings > Account Information. |
| Cloudflare WAF / Bot Fight Mode | Cloudflare challenge page blocking Googlebot | Create Cloudflare WAF Bypass rule for URI path /ads.txt. |
| Crawl Delay After Deployment | Normal AdSense crawler indexing latency | Wait 24 to 72 hours. Google automatically scans and clears dashboard flags. |
Frequently Asked Questions
Conclusion
Properly configuring and validating your ads.txt file is one of the quickest, highest-impact technical tasks you can complete to protect your website's advertising earnings. By ensuring your file is positioned at the root domain, correctly structured with your active 16-digit publisher ID, and accessible without WAF or robots.txt interference, you guarantee maximum programmatic bid competition and revenue safety.
Before launching or expanding your monetization strategy, make sure to audit your entire website using our free AdSense Approval Checker to catch policy or technical oversights before Google reviewers do.