ads.txt for AdSense Explained: How to Create It on WordPress, Blogger and Any Host
By Ramón Martínez · Updated 24 Oct 2026 · 7 min read
Sooner or later your AdSense dashboard will show a banner about ads.txt. It's a tiny text file, but if it's missing or wrong, some advertisers may not bid on your ad space. The fix takes about five minutes, and once it's right you rarely need to touch it again.
What ads.txt is (in one paragraph)
ads.txt stands for Authorized Digital Sellers, a standard from the IAB Tech Lab. It's a public file at the root of your domain that lists which companies are allowed to sell your ad inventory. Ad buyers check it so they don't end up paying someone who is spoofing your site. For AdSense, all you need is one line authorizing Google with your publisher ID.
Do you need it to get approved?
It isn't generally treated as an approval requirement, and Google describes it as strongly recommended. The real impact comes after approval: without a correct ads.txt, demand for your inventory can drop. So the practical answer is to set it up before you apply or right after.
The exact AdSense line
The AdSense entry is a single line with four comma-separated fields:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
| Field | What it means |
|---|---|
google.com | The advertising system's domain. |
pub-0000000000000000 | Your publisher ID. Replace it with yours (Account → Account information in AdSense). |
DIRECT | You control the account directly. |
f08c47fec0942fa0 | Google's certification authority ID. It's the same for everyone. |
Tip: copy the snippet AdSense gives you in the ads.txt alert or the Sites section. It already contains your ID, so there's no risk of a typo.
Step by step on your platform
Self-hosted WordPress
- Create a plain text file named exactly
ads.txtcontaining the Google line. - Open your host's file manager, or connect via SFTP.
- Upload it to the site's root folder (the one containing
wp-config.php, oftenpublic_html). - Visit
https://yourdomain.com/ads.txtand confirm the line shows as plain text.
No file access? Several plugins let you manage ads.txt from the WordPress dashboard. Pick one approach only: a plugin plus a physical file, or two plugins, can conflict.
Blogger
- If your blog is linked to AdSense, Blogger typically serves an ads.txt automatically.
- For a custom one, go to Settings → Monetization, enable custom ads.txt and paste the line.
- Save, then open
yourblog.blogspot.com/ads.txt(or your custom domain) to check.
Static sites and other hosts
- Put
ads.txtin the folder your build publishes as the web root (oftenpublicorstatic). - Redeploy.
- Make sure the URL returns the text file itself, not your HTML 404 page or a single-page-app fallback.
Check your ads.txt without leaving the browser
MonetizeReady flags what can hold back AdSense on the page you're viewing, with a simple traffic light. The Pro version also checks that /ads.txt exists and that its publisher ID matches your ad code.
Troubleshooting checklist
| Problem | Fix |
|---|---|
File sits in a subfolder (/blog/ads.txt) | Move it to the domain root: /ads.txt. |
| Publisher ID doesn't match your ad code | Copy the ID from AdSense; keep the pub- prefix. |
Saved as ads.txt.txt or rich text | Turn on file extensions and save as plain text. |
| URL returns an HTML page | A theme, router or redirect is catching the URL; serve the physical file. |
www vs non-www redirect is broken | Test both versions; both should end up at the same file. |
| Old lines from networks you no longer use | Remove them to keep the file clean. |
How long until the warning goes away?
Google has to recrawl the file, so the alert won't clear the moment you upload it. It can take a few days. As long as the URL loads correctly, you don't need to do anything else. You can see each domain's ads.txt status in the Sites section of AdSense.
FAQ
Do I need an ads.txt for each subdomain?
Crawlers look for the file at the root domain. If your site lives on a subdomain, the root domain's ads.txt is usually what counts; check which domain AdSense lists for your site.
Can I list several ad networks?
Yes. Each network adds its own line. Keep the Google line when adding others.
Does ads.txt affect SEO?
There's no indication it affects rankings. It's an advertising file, not a search signal.
My file looks right but the warning is still there.
Confirm the URL returns status 200 as plain text, with and without www, then give Google time to recrawl it.
Still getting ready to apply? Go through the AdSense approval checklist, make sure your privacy policy covers AdSense, and read how to fix "low value content".
MonetizeReady is an independent tool, not affiliated with Google. AdSense is a trademark of Google LLC.