AdSense wants a one-line text file at the root of your domain, and WordPress gives you no obvious place to put it. There is no file manager in wp-admin, the Site Kit plugin that most publishers already run does not handle it, and the AdSense help page just says to check with your "site builder." So the job stalls at the first step and the "Earnings at risk" banner sits there for weeks. Here are the two ways that actually work on a self-hosted WordPress site, the hosted-WordPress.com exception, and how to confirm Google can read the file once it's up.
The line you're adding
Whatever method you use, the file's contents are the same. For AdSense it is a single line:
google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, f08c47fec0942fa0
Replace the sixteen X's with your own publisher ID, which AdSense shows under Sites and in your account settings — or click Fix now on the warning banner and download the file Google generates, which arrives with the correct ID already filled in. Leave the last field exactly as it is: f08c47fec0942fa0 is Google's own identifier and is identical for every AdSense publisher. If you also sell through other networks, each one gets its own line in the same file.
Method 1: the plugin route (no FTP, no file)
The simplest option is Ads.txt Manager, a free plugin from 10up with over 100,000 active installs. Install and activate it, go to Settings → Ads.txt, paste your line(s) into the box, and save. The plugin validates each record as you go — a useful guard, since a malformed line can be cached by ad systems for a day before the correction is picked up — and it keeps a revision history so you can see what changed and when.
The thing to understand about this plugin is that it never writes a physical file. It serves yourdomain.com/ads.txt virtually through WordPress's rewrite system, which is why it needs pretty permalinks enabled and a site URL with no path in it. Two consequences follow. First, if a real ads.txt file already exists in your web root — from a previous owner, an agency, or an earlier attempt — the plugin will not read it and cannot override it; the server will keep serving the physical file. Copy its entries, delete or rename the file, then re-enter the records in the plugin screen. Second, on a path-based multisite install (example.com/site/) the file won't appear where Google looks for it, so activate the plugin per-site on the main site rather than network-wide. The same plugin also manages app-ads.txt for publishers with mobile inventory.
Method 2: upload the file yourself
If you'd rather not add a plugin for a one-line file, put a real one on the server. Create it in a plain-text editor (not a word processor — smart quotes and hidden formatting will break it), save it as exactly ads.txt in lowercase, and upload it using your host's file manager or an SFTP client. The destination is the domain root: on most hosts that is the public_html folder, and on a standard WordPress install it's the same directory that holds wp-config.php. Google defines the root as the directory or folder immediately following your top-level domain, so if WordPress lives in a subfolder (yourdomain.com/blog/), the file goes one level up in the domain root, not in the WordPress folder. A physical file has one advantage over the plugin: it survives a theme change, a plugin cleanup, or a permalink reset. Its disadvantage is that it also survives a site migration only if whoever runs the migration remembers to bring it along.
What Site Kit does and doesn't do
Site Kit by Google will connect your AdSense account and place the ad code on every page automatically — that's its job, and it does it well. It does not create or manage ads.txt. Its AdSense documentation doesn't mention the file at all, and the request to have Site Kit generate a basic ads.txt has sat open on the project's issue tracker since 2023. If you assumed the green checkmark in Site Kit meant the AdSense setup was finished, that's the gap: the code is placed, the authorization file is not. Use one of the two methods above alongside it.
The WordPress.com exception
Hosted WordPress.com sites split by plan. On plugin-enabled plans you can do either of the above — install Ads.txt Manager, or upload the file over SFTP. Sites monetizing through WordAds get an ads.txt generated automatically, and you can append your own entries from other networks under Jetpack → Monetize → View ad dashboard → Settings, where a "Customize your ads.txt file" toggle opens a box for additional lines. On plans without plugin support, the file can't be customized at all — which, if you're running AdSense there, is a plan question rather than a configuration question.
Verify it, then wait
Before you trust any dashboard, open an incognito tab and load yourdomain.com/ads.txt directly. You want plain text with your pub- line in it — not a themed 404 page, not a redirect to the homepage, and not the plugin's settings screen. Then in AdSense go to Sites, select the domain, and click Check for updates. Google says changes can take a few days to show, and on sites that make few ad requests up to a month, so a correct file that still reads "not found" tomorrow is not a reason to start over. Fix it once, confirm the URL loads, and leave it alone.
WordPress is the easy case, incidentally. Platforms that give you no root access at all need a redirect trick instead — our guide to adding the AdSense ads.txt file to Shopify covers that one. Either way, the file belongs on the same recurring checklist as your analytics filters and consent banner: load the URL once a month, thirty seconds, done.