AdSense ads.txt in WordPress: How to Check Yours Is Correct (I Tested Mine)

If you use Google AdSense on a WordPress site, you will sooner or later see a warning about AdSense ads.txt. The message says the file is missing, or that your publisher ID is not authorized, and it often warns that your earnings are at risk. Most guides tell you to upload a file and stop there. They rarely explain how to check that the file is actually correct.

So I tested mine. Below you will find the seven checks I ran on my own site, Beeznez Tech, with the real results, what Google’s own status labels mean, and what to do if a check fails. Everything about my file is shown with the publisher ID hidden.

Is ads.txt required for AdSense approval? No. Google’s ads.txt guide says that use of the file is not mandatory but is highly recommended. Google’s page on adding a site to AdSense lists three ways to connect and verify a site (the AdSense code snippet, an ads.txt snippet or a meta tag), so ads.txt is one option rather than a gate, and Google lists a site’s approval status separately from its ads.txt status. Approval depends on your site meeting the AdSense program policies. I still recommend a correct file, because AdSense raises alerts when it is missing and the file helps protect your revenue. I re-checked my own file and the Google help pages on 10 November 2026.

Revenue is only half the equation, though. Before optimising earnings it is worth knowing what the site costs in the first place — what the site costs to run each year is itemised line by line on my own site.

What Is an AdSense ads.txt File?

Ads.txt stands for Authorized Digital Sellers. It is a small public text file, an initiative of the IAB Tech Lab, in which you list the companies allowed to sell advertising on your site. Google explains in its ads.txt guide for AdSense that it helps advertisers avoid counterfeit inventory and helps you receive spend that might otherwise go to fakes.

For AdSense, the file contains one line that names Google and your publisher ID. It must sit in the root of your domain, which means it has to be reachable at yourdomain.com/ads.txt. A copy inside a subfolder, such as your uploads directory, does not count.

What the AdSense ads.txt Statuses Mean

In your AdSense account, the Sites page shows an ads.txt status for each site. According to Google’s site status help page, these are the possible values:

StatusWhat it means
AuthorizedYour publisher ID was found in the site’s ads.txt file.
Not foundThe AdSense crawler found no ads.txt file the last time it visited.
UnauthorizedYour publisher ID was not found in the file, so ad requests from the site are rejected.
Not applicableYour ID is not needed because a platform manages the file.

 

AdSense ads.txt in WordPress: browser view of my ads.txt file with the publisher ID hidden and seven checks passed

My ads.txt file as seen in a browser, with the publisher ID hidden.

The goal is Authorized. (Google notes that AdSense Direct accounts do not support ads.txt files and can ignore the status.) The statuses are produced by Google’s crawler, so only your AdSense account can tell you the final answer. What I can do from the outside is check everything that would make the crawler succeed or fail, and that is what the next section covers.

AdSense ads.txt in WordPress: 7 Checks on My Site

These are the tests I ran and the results:

SerialCheckResult on my site
1File exists in the site rootYes, a real file with normal permissions
2Loads with status 200 as plain text200, text/plain, 59 bytes
3Line format is validOne line, four fields, correct pattern
4Publisher ID matches the AdSense scriptMatch
5HTTP redirects to HTTPSYes, with a 301
6Not blocked by robots.txtNot blocked
7Clean file: no BOM, normal line endingsClean

 

All seven passed. Here is what each check involves, so you can repeat it.

1. Does the file exist in the root?

My ads.txt is a physical file in the same folder as WordPress itself. Its permissions are the standard 0644, meaning the web server can read it, and it was last changed on 7 September 2026. None of my plugins manages ads.txt, so nothing can overwrite it. If yours is created by a plugin, make sure the plugin stays active.

2. Does it load correctly?

Open https://yourdomain.com/ads.txt in a browser. You should see plain text, not a web page. Mine returns a 200 status with the type text/plain, and the file is 59 bytes. That size is a clue: a single AdSense line is only about 55 to 60 characters long. If your file is thousands of bytes, you probably have a web page, not a text file.

3. Is the line valid?

The AdSense line has four comma-separated parts: the domain (google.com), your publisher ID (pub- followed by 16 digits), the relationship (DIRECT) and Google’s certification authority ID. It looks like this, with a dummy ID:

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

The last field is the same for every AdSense publisher. Only the publisher ID is yours. Mine matched this pattern exactly, on a single line.

4. Does the ID match your AdSense script?

This is the check that catches the most mistakes. The AdSense code on your pages contains a client ID that starts with ca-pub-, and the digits after it must be the same as the digits in your ads.txt line. On my site, the AdSense snippet in the head of my pages carries the same ID as my ads.txt line (re-checked on 10 November 2026). One nuance: my speed setup holds the AdSense loader back until a visitor first scrolls or taps, so I also publish the google-adsense-account meta tag, one of the verification methods Google lists. The ID in that tag matches as well. A mismatch, for example from copying the file from another account, is the classic cause of an Unauthorized status.

5. Do HTTP and HTTPS both behave?

Requests to the plain HTTP address of my ads.txt return a 301 redirect to the HTTPS address, so the crawler ends up at the right place whichever it tries. I covered why HTTPS and redirects matter in my article on WordPress security headers.

One detail surprised me. The www version of my ads.txt answered with a normal 200 instead of redirecting to the non-www address, even though my pages redirect. That is most likely because a physical file is served directly by the web server and skips WordPress’s redirect, though I did not confirm the cause. It is harmless, since Google reads the root domain, but you should know it behaves differently from your pages.

6. Is it blocked?

A robots.txt rule or an X-Robots-Tag header could stop a crawler from reading the file. My robots.txt blocks only the WordPress admin area and lists my sitemap, and the ads.txt response carries no robots header, so nothing stands in the way.

7. Is the file clean?

Invisible characters can break a file that looks right on screen. I checked that mine has no byte order mark at the start, uses standard line endings and ends with a normal new line. If you edit the file in a word processor, it may add hidden formatting, so use a plain text editor.

What Can Go Wrong With AdSense ads.txt in WordPress

  • Wrong location. The file is in a subfolder instead of the site root.
  • Not found because of a soft error. Your site returns a styled “page not found” with a 200 status instead of the text file.
  • Wrong publisher ID. A typo or an ID from another account causes Unauthorized.
  • Double extension. A file named ads.txt.txt, created by some editors.
  • Permissions too strict. A file the server cannot read returns a 403 error.
  • Cache serving an old copy. A caching plugin or CDN keeps the previous version.
  • Blocked by a security rule. A firewall or rule that treats text files as suspicious.

How to Add or Fix Your AdSense ads.txt File

  1. In AdSense, open Sites, choose your site and find the ads.txt snippet. Google shows the exact line for your account.
  2. Create a plain text file named exactly ads.txt and paste the line in.
  3. Upload it to the root of your site using your host’s file manager or FTP, in the same folder that holds the wp-config file.
  4. Open the file in your browser to confirm it loads as plain text.
  5. Wait for Google’s crawler. If you changed the file and your status does not update, AdSense lets you ask for a recheck.
  6. If the status reads Authorized and the site still shows Requires review, Google’s guide says to click Request review. Finish the account setup tasks on your AdSense homepage first: Google says a review requested without them is not carried out and the site stays in Getting ready.

Google’s ads.txt guide says changes can take a few days to show in AdSense, and up to a month if the site makes few ad requests. Use Check for updates on the site’s page to ask for a recheck.

What I Could Not Verify

My checks show that the file is correct as seen from the outside. I cannot see Google’s crawler or my AdSense status page from here, so the label shown in my account is the final word. If you run these seven checks and everything passes but the status still says Not found, wait for the next crawl and ask for a recheck. Whether Google has indexed a page is a separate question; see why Google hasn’t indexed your pages.

Trust signals matter beyond this one file. If you apply for AdSense, the policy pages, authorship and original content count as well, which I explained in my guide to E-E-A-T and AI content. Ad code also adds weight to your pages, which I measured in my audit of CSS and JavaScript files in WordPress.

Quick Checklist

  • Open your ads.txt address and confirm plain text.
  • Confirm the file is in the site root, not a subfolder.
  • Check the line has four fields and one publisher ID.
  • Match the ID with the ca-pub ID in your AdSense script.
  • Confirm HTTP redirects to HTTPS.
  • Check robots.txt does not block the file.
  • Look at the Sites page in AdSense for the real status.

Frequently Asked Questions

Is ads.txt required for AdSense approval?

No. Google says ads.txt is not mandatory but is highly recommended. It is one of the verification methods AdSense offers when you add a site, alongside the code snippet and a meta tag, and the approval status is shown separately from the ads.txt status.

Where do I put the AdSense ads.txt file in WordPress?

In the root folder of your site, next to wp-config.php, so that it opens at yourdomain.com/ads.txt.

Do I need a plugin for AdSense ads.txt?

No. A single text file uploaded through your host is enough. A plugin is only useful if you prefer to edit the file from the dashboard.

What does Unauthorized mean in AdSense?

According to Google, it means your publisher ID was not found in the site’s ads.txt file, and ad requests from the site are being rejected until you add it.

How long does it take for AdSense to see my ads.txt file?

Google says it can take a few days, and up to a month for sites with few ad requests. Use Check for updates in AdSense to ask for a recheck.

Does the www version of my site need its own AdSense ads.txt?

Google reads the file from your root domain. If both versions serve the file, as mine do, nothing extra is needed.

AdSense ads.txt in WordPress: Final Thoughts

A correct AdSense ads.txt file is small and simple, but there are several ways to get it wrong without noticing. On my site, all seven checks passed: the file sits in the root, loads as plain text, has a valid single line, matches my AdSense script, redirects from HTTP, is not blocked and is free of hidden characters. Run the same checks on yours, then confirm the result in your AdSense Sites page, which is the only place that shows what Google actually sees.

More checks and real numbers from this site: browse the guides.