SEO & Indexing
ads.txt Debugging Guide
Verify ads.txt placement, publisher ID, HTTPS access, redirects and cache state before an AdSense site review. This reference is written as a practical operating note for developers, DBAs and platform teams who need to make the next troubleshooting step visible.
Use it with the live Formalint tools, then keep the final finding in a ticket, release note or runbook so the next person can repeat the same checks.
Good fit for
- AdSense says the site is not ready or cannot verify ads.txt yet.
- A custom domain was connected to GitHub Pages.
- You changed DNS and need to prove the public ads.txt response.
Practical workflow
| Step | What to verify |
|---|---|
| Open the root file | ads.txt must be available at https://formalint.com/ads.txt, not only inside a subfolder. |
| Match the publisher ID | Compare the pub ID in AdSense with the exact ads.txt line. |
| Avoid broken redirects | HTTP should redirect to HTTPS and the final response should be 200. |
| Allow cache time | After a fix, give crawlers time to fetch the new file before requesting another review. |
Command or evidence sample
google.com, pub-6534346834787678, DIRECT, f08c47fec0942fa0Quality checklist
- Confirm the public URL, browser, terminal, deployment or Search Console context.
- Capture the first useful error, header, status, sitemap entry or metric before editing.
- Keep secrets, tokens, cookies and private user data out of copied examples.
- Make one meaningful fix, publish it, then verify the live page rather than the local preview.
- Link the page to related Formalint references so visitors and crawlers can understand the topic cluster.
Common mistake
The common mistake is fixing ads.txt while the real AdSense rejection is still low-value content or weak page quality.
Formalint's rule for this topic: improve the page because it helps a real developer, then let Search Console observe the improvement naturally.
Related Formalint references
Continue with How Formalint Works, Sitemap Lastmod Strategy, Google Search Console Indexing.
Frequently asked questions
Should this be checked after every release?
Check it whenever the related page, deployment path, crawler signal, browser behavior or user-facing workflow changes in a meaningful way.
Can I use sensitive production data in examples?
No. Redact secrets and personal data before copying commands, URLs, payloads, logs or screenshots into a public tool or support note.