Home/Blog/How to Fix AdSense ‘ads.txt Not Found’ — Earnings at Risk (2026)

How to Fix AdSense ‘ads.txt Not Found’ — Earnings at Risk (2026)

AdSense dashboard warning about missing ads.txt file with magnifying glass

Your AdSense dashboard warns “ads.txt not found” — “Earnings at risk.” This AdSense ads.txt not found fix guide explains the stakes first: ads.txt is the file that tells advertisers who is authorised to sell your ad inventory. Without a valid one at yourdomain.com/ads.txt, programmatic buyers treat your inventory as unverified, which means lower bids, reduced fill, and real revenue loss. The fix is usually a ten-minute file job — this 2026 guide covers every reason AdSense cannot see it.

The file itself is simple: one line per authorised seller, in the format google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, f08c47fec0942fa0 (with your publisher ID). The complexity is all in delivery — the file must be reachable at the domain root, served as plain text, with no redirects, blocks, or HTML wrappers. Work through the checks below in order.

What Causes “ads.txt Not Found”

  • No file uploaded: the file was never created in the domain root.
  • Wrong location: uploaded to a subfolder or a subdomain instead of the root domain.
  • Wrong filename: ads.txt.txt (hidden extension), wrong case, or extra characters.
  • Redirects or blocks: the URL 301-redirects (www ↔ non-www), returns 403, or is blocked by .htaccess/security rules.
  • Wrong content type: served as text/html instead of text/plain — often WordPress rewrite rules hijacking the request.
  • CDN/cache staleness: Cloudflare or a caching plugin serving an old 404.
  • robots.txt blocking: accidentally disallowing Google’s Mediapartners-Google crawler.

How to Fix “ads.txt Not Found”: 8 Steps

Step 1: Create the file with the correct content

Get your publisher ID from AdSense → Account → Account information (it looks like pub-1234567890123456). Create a plain-text file named exactly ads.txt containing: google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, f08c47fec0942fa0 — with your ID substituted. No BOM, no rich formatting; Notepad or VS Code in plain-text mode.

Step 2: Upload it to the domain root

Via cPanel File Manager or FTP, place ads.txt in public_html (the domain’s root — not /wp-content/, not a subdomain folder). WordPress users can also use the Ads.txt Manager plugin, but a physical file is more reliable than a virtual one, especially behind CDNs.

Step 3: Verify it loads as plain text

Open https://yourdomain.com/ads.txt in an incognito window. You must see only your ads.txt line — no theme layout, no 404 page, no HTML. Then check headers: curl -I https://yourdomain.com/ads.txt should return HTTP/2 200 and content-type: text/plain. A 301, 403, or text/html means something is still in the way.

Uploading a text file to a website root directory via file manager

Step 4: Fix www vs non-www and HTTPS redirects

AdSense checks the canonical domain. If your site redirects http:// → https:// or non-www → www, that is fine only if the final destination serves the file with a 200. Test both variants; the file must be reachable at the exact domain registered in AdSense.

Step 5: Clear .htaccess and security-plugin blocks

Overzealous rules (blanket Deny from all on text files, hotlink protection, or security-plugin hardening) return 403 to the crawler. Add an explicit exception for ads.txt, or for Apache add a <Files "ads.txt"> ForceType text/plain </Files> block before WordPress rewrites. For Nginx: location = /ads.txt { default_type text/plain; try_files $uri =404; }.

Step 6: Purge CDN and plugin caches

In Cloudflare (or your CDN), purge the cache for the /ads.txt URL specifically, and consider a bypass/cache rule so it is never cached. In WordPress, clear your caching plugin (LiteSpeed Cache, WP Rocket) — a cached 404 is a classic reason the file “exists” but AdSense cannot see it.

Step 7: Check robots.txt allows the crawler

Ensure you are not blocking Google’s ad crawler: User-agent: Mediapartners-Google followed by an empty Disallow: grants full access. A sitewide Disallow: / (sometimes left over from staging) blocks ads.txt verification too.

Step 8: Request a re-check and wait

In AdSense → Sites, click your domain → “Check for updates”. Google crawls ads.txt roughly every 24 hours; the warning typically clears within 24–48 hours (up to a month on very low-traffic sites). If it is still flagged after that, re-run the curl check — something regressed. For broader monetisation health, run a pass with our free site audit tools.

How to Prevent ads.txt Issues

  • Keep the physical file in root; avoid relying solely on virtual-file plugins.
  • After migrations, re-upload and re-verify ads.txt on day one.
  • Never let staging Disallow: / rules ship to production.
  • Re-check the file quarterly — especially after changing security plugins or CDN settings.

Conclusion

“ads.txt not found” is almost always a delivery problem, not a content problem: right file, right name, root location, plain-text 200 response, no blocks, then patience for the crawler. Get those right and the earnings-at-risk warning disappears. For more AdSense and WordPress fixes, keep reading the KamiWeb blog.