What’s the easiest way to add the Ads.txt file to your WordPress site?

Estimated read time: 2 minutes



I had logged into my Google Adsense account and there was the warning: My earnings were at risk!

google adsense ads dot text warning

Now, it’s not like Adsense was on track to make me millions anytime soon, but why leave money on the table? And it was an opportunity to check into a problem and a solution. That’s what content marketers do!

As Google Adsense states:

Authorized Digital Sellers, or ads.txt is an IAB initiative that helps ensure that your digital ad inventory is only sold through sellers (such as AdSense) who you’ve identified as authorized. Creating your own ads.txt file gives you more control over who’s allowed to sell ads on your site and helps prevent counterfeit inventory from being presented to advertisers.

OK. Sounds good. How do I set this up? Of course, there’s a WordPress plugin for it. I went to my Plugins section in my site’s dashboard and downloaded the ads.txt plugin:

ads txt plugin

Once installed, it shows up in your SETTINGS. Ad the following text (of course, change the pub-…. with your publisher number). Your publisher number can be found in Adsense by going to My Account.

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

In the plugin: Click save. Done.



Click To Tweet

Now, the warning was still there in Google Adsense for me a few hours later and I have no other sites connected to that specific account. But it appears it is set up correctly so I will let it run and maybe monitor the earnings.

As Google states in its support forum:

Google uses the content of any ads.txt files hosted on a root domain to determine which seller accounts are allowed to serve ads on that domain. No additional enforcement exists for root domains without an ads.txt file.

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.

New and updated ads.txt files are detected automatically, but changes may take up to 24 hours.


That’s how I added my ads.txt. Easy breezy. Have a WordPress site and need something fixed? There’s probably a plugin for that.

If you are running a content marketing strategy though, just make sure you don’t have more plugins than blog posts. 🙂