How to fix the AdSense "Earnings at risk" ads.txt alert
Key takeaways
- The AdSense ads.txt alert appears when Google's crawler finds no ads.txt file on a site ("Not found") or finds one that does not include your publisher ID ("Unauthorized").
- Google says ads.txt is not mandatory, but if a site has an ads.txt file whose publisher identifier is incorrect, Google does not run an auction for that request.
- Google states that ads.txt changes may take a few days to be reflected in AdSense, and up to a month for sites that do not make many ad requests.
- After fixing the file you can click "Check for updates" on the site's page in AdSense to ask Google to recheck it.
- If a previously crawled ads.txt returns HTTP 404, Google purges the earlier entries; after a soft 404 or a 5xx error, it keeps them for up to 5 days.

The AdSense “Earnings at risk” alert means Google’s crawler could not confirm that your site authorizes your AdSense account in ads.txt: either no file was found or the file does not contain your publisher ID. Fix it by publishing the exact line from your account at yourdomain.com/ads.txt, then wait: Google says changes take a few days, up to a month on low-traffic sites.
What does the “Earnings at risk” alert mean?
It is the account-level alert AdSense shows when one or more of your sites has an ads.txt problem. Google’s Ads.txt guide describes it simply: “If there’s an issue with ads.txt on your site, you’ll have an alert in your AdSense account. To prevent any impact to your revenue, follow the relevant steps below to fix the issue.” The alert carries a “Fix now” button that takes you to the affected site.
Behind the alert, each site in the “Sites” page has an ads.txt status. Three values matter:
| ads.txt status | What Google found | What to do |
|---|---|---|
| “Not found” | No ads.txt file on the site | Create the file and upload it to the root domain |
| “Unauthorized” | A file exists but your publisher ID is missing (or wrong) | Add the AdSense line to the existing file |
| “Authorized” | Your publisher ID is listed correctly | Nothing; the alert clears once all sites are authorized |
Once a site is “Authorized” and its site status is “Ready”, Google says ads start to show, and it “may take up to an hour for ads to appear on your pages”. If the site still requires a review, click “Request review” (see AdSense site statuses).
How much revenue is actually at risk?
This depends on which status you have, and the difference is important.
“Not found” (no file). Google says “Use of ads.txt is not mandatory, but it’s highly recommended.” Ads can still serve. The risk is demand: the Ads.txt troubleshooter explains that “Advertisers who use some of our ads products to buy ad space on publisher sites now have the option to only bid on inventory from sellers that are classified as authorized through ads.txt.” Those advertisers may skip your inventory.
“Unauthorized” (file without your ID). This is far worse. The Ads.txt FAQs say: “Google runs an auction and returns a winning ad for requests on sites where an ads.txt file exists with a correctly listed publisher identifier. If the identifier in the file is incorrect, an auction is not run for that request.” A file that lists other networks but not you, or lists you with a typo, blocks Google demand.
That is why a half-done ads.txt (for example a file left by a previous ad network or a plugin) is more harmful than none at all. Google does not publish a revenue figure for either case.
How do I fix it, step by step?
- Get your line. Sign in to AdSense. Click “Fix now” on the alert, or open “Sites” and click the site with the “Not found” or “Unauthorized” status. Select the “Ads.txt snippet” option and click “Copy”. The line looks like
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0(field details in ads.txt syntax). - Create or edit the file in a plain text editor. Google suggests Notepad (Windows) or TextEdit (Mac). If a file already exists, add the line; do not delete other networks’ lines you still use.
- Upload it to the root of the domain, so it answers at
https://example.com/ads.txt. Not in a subfolder, not only onwww. - Open the URL in a browser. Google says: “If the ads.txt file displays in your web browser, then it’s likely that AdSense will successfully find it.”
- Check the technical variants (next section). A browser hides redirects and status codes.
- Click “Check for updates” on the site’s page in “Sites”. This asks AdSense to recheck the file.
- Wait. Do not keep editing the file.
Why does the alert stay after I uploaded the file?
Google’s Resolve common ads.txt issues page names timing as the first cause: “It may take a few days for AdSense to automatically crawl and verify your ads.txt file. Wait at least a few days for your ads.txt status to update. If your site doesn’t make many ad requests it may take up to a month.”
If more than a few days have passed, work through the crawl checks Google lists in Ensure your ads.txt files can be crawled:
| Check | What Google requires | Quick test |
|---|---|---|
| Root domain | Crawling starts at the root domain; www.domain.com/ads.txt is only crawled if domain.com/ads.txt redirects to it |
curl -sIL http://example.com/ads.txt |
| HTTP and HTTPS | Google crawls both; each must serve the file or redirect to the one that does | Request both schemes |
| Status code | Must be HTTP 200 OK; a 404 status is ignored even if a body is returned | Look at the first line of curl -sI |
| robots.txt | Must not disallow the path (for example Disallow: /ads) or Googlebot |
Read /robots.txt |
| Formatting | No typos, extra commas, invalid whitespace or rich-text characters | Compare with the AdSense snippet |
The most common real-world blockers (redirect chains, a www-only file, CMS pages returned with a 200 status, bot protection) are covered in detail in ads.txt Not found or Unauthorized.
What should I avoid while waiting?
Do not remove a correct file. Google is explicit: “Don’t remove your ads.txt if it is correctly set up. Any changes made to your ads.txt file will affect the review time.”
Do not let the file disappear during a redesign or migration. Google explains what happens when a previously crawled file becomes unavailable:
- If the response is a 404, “the file doesn’t exist. The previous entries will be purged.”
- If the response is a soft 404 (a real page returned with status 200 for a URL that does not exist) or a 500 server error, “the entries will be retained for up to 5 days.”
So a short server outage is tolerated for a few days, but a deployment that drops the file wipes your authorization at the next crawl.
Do not add your ID to random lines. Each line authorizes a specific seller account on a specific ad system. Adding google.com lines with other people’s IDs, or copying a competitor’s file, authorizes those accounts to sell your inventory.
What if I cannot place a file on the root domain?
If your site is on a domain you do not control (a hosted platform or a subdomain of someone else’s domain), the troubleshooter says you “can ask them to host the ads.txt file on your behalf” or “ask the service provider to set up a subdomain referral”. The FAQ gives the same advice for CMSs that do not allow root files: “Contact your CMS provider who should provide you with the facility to host an ads.txt file on your behalf.” For Blogger, the FAQ points to the Blogger Help Center instructions. Subdomain referral is explained in ads.txt and subdomains.
Troubleshooting summary
| Symptom | Most likely cause | Fix |
|---|---|---|
| Status “Not found”, file uploaded today | Not crawled yet | Wait a few days, then “Check for updates” |
| “Not found” for weeks, file visible in browser | Only on www, or HTTP/HTTPS variant returns 404, or robots.txt block |
Redirect root to the file, fix both schemes, allow the path |
| “Unauthorized” | Your pub- ID missing, mistyped, or written as ca-pub- |
Paste the exact AdSense snippet |
| Alert returns after being cleared | File removed or broken by a deploy, plugin or theme change | Restore the file and make it part of your deployment |
| Alert on one site only | Each site is crawled separately | Fix that site’s own root domain file |
Once every site in “Sites” shows “Authorized”, the alert disappears on its own. To catch regressions before Google does, monitor the file with a scheduled check, as described in validating ads.txt yourself.
Frequently asked questions
Do I lose all my AdSense revenue while the Earnings at risk alert is showing?
Not necessarily. Google says ads.txt is not mandatory, so a site with no ads.txt file can still show ads, although some buyers can choose to bid only on authorized inventory. The serious case is a file that exists but does not list your publisher ID: Google's FAQ says that if the identifier in the file is incorrect, an auction is not run for that request.
How long does the ads.txt warning take to disappear after I fix the file?
Google says it may take a few days for changes to be reflected in AdSense, and up to a month if your site does not make many ad requests. You can click "Check for updates" on the site's page under "Sites" to ask for a recheck. Google does not publish a fixed recrawl schedule.
Should I delete and re-upload ads.txt to force a recrawl?
No. Google advises: "Don't remove your ads.txt if it is correctly set up. Any changes made to your ads.txt file will affect the review time." A missing file that returns HTTP 404 also makes Google purge the entries it had already crawled, which can make the situation worse.
My file loads in the browser but AdSense still says Not found. Why?
The usual causes are that the root domain does not serve or redirect to the file (for example the file is only on www), the HTTP or HTTPS version returns 404, robots.txt blocks the path or Googlebot, or the response status is not 200. Test each variant with curl and fix redirects before waiting for a recrawl.
Sources
- Ads.txt guide · Google AdSense Help
- Resolve common ads.txt issues · Google AdSense Help
- Ads.txt FAQs · Google AdSense Help
- Ensure your ads.txt files can be crawled · Google AdSense Help
- Ads.txt troubleshooter · Google AdSense Help
Related guides
- ads.txt "Not found" or "Unauthorized": a technical checklist for redirects, HTTPS, status codes and robots.txt
Diagnose ads.txt Not found and Unauthorized statuses: root vs www, HTTP vs HTTPS, redirect rules, 404 and soft 404, robots.txt, content type, with curl tests.
- ads.txt syntax for AdSense, line by line: pub ID, DIRECT, TAG ID, comments and variables
The AdSense ads.txt line field by field: google.com, your pub ID, DIRECT, f08c47fec0942fa0, plus comments, variables and the formatting errors that break parsing.
- Validating ads.txt yourself: curl checks, the IAB Tech Lab open-source crawler and scripted audits
Check your ads.txt without third-party validators: curl tests that mimic a crawler, the IAB Tech Lab open-source crawler and its limits, and a short audit script.
- AdSense site statuses explained: what each status on the Sites page means and what to do
What "Requires review", "Getting ready", "Needs attention" and "Ready" mean on the AdSense Sites page, plus the ads.txt column, and the exact next step for each.
- How to connect your site to AdSense: the three verification methods compared
Compare the three AdSense site verification methods (code snippet, ads.txt, meta tag), copy the exact snippets, and fix "code missing" or "unreachable" errors.