I run google adsense ads on my site.

I don't really understand what the purpose of ads.txt is and what risks are there for me without ads.txt.

Everywhere I looked there were vague descriptions of what an ad fraud was and such. I couldn't relate those to my site and how ads.txt could help with that.

I only run Google Adsense and I trust it. I don't understand why I should restrict something. If something else could show their ads on my site then it is completely different matter about security that I should fix.

Please explain with a simple example what ads.txt stands for and if it can mess with my income.

2 Answers 2


ads.txt merely confirms who is allowed to sell advertising on your site. So in your case you would just list Google.

I'm not sure why this restricts things for your site? ads.txt supports multiple vendors.

How does this prevent fraud? If you have any third party content - articles, blog posts, comments, etc then a third party could insert their own unauthorized advertising in your site.

Also a hacker might hack into your site. Okay if they had root access they could change your ads.txt so that it is ineffective. But if you are running a CMS then it is much more likely they would only hack the CMS to insert their own advertising. ads.txt would prevent that from working.

  • 1
    It sounds like not having an ads.txt file would be fine if you don't have third party content. Why is Google AdSense putting up big warnings about it? My account says: "Earnings at risk - You need to fix some ads.txt file issues to avoid severe impact to your revenue. FIX NOW." It doesn't seem like not having an ads.txt file could hurt your revenue. It only sounds like having one formatted incorrectly could. Commented Jul 24, 2019 at 17:46
  • You'd have to ask Google, but I suspect it is their way of trying to improve community security and prevent fraud through their system.
    – winwaed
    Commented Jul 24, 2019 at 17:52
  • How exactly does it prevent ads from running? Do all ad vendors agree to check ads.txt before serving any ad? And what if the ‘hacker’ uses Adsense also? Commented Jul 25, 2019 at 12:15
  • I think that is the idea - of course an attacker could use a vendor that doesn't. I think adsense placements are now tied to domains(?)
    – winwaed
    Commented Jul 25, 2019 at 12:30
  • @DisgruntledGoat The ads.txt has your publisher ID in it, so if the attacker uses AdSense with their own publisher ID, it won't match and the ads won't get served. Commented Jul 26, 2019 at 12:29

I spoke to Google about this last year due to the ominous warning appearing. They checked my ads.txt and said it was fine after which they said it was a bug in the systems which should disappear in few days.

Ads.txt is basically there to confirm you are the site owner and approve adsense to run on the site - the idea being that the site owner should be the only one who can upload the ads.txt

If you run many sites you could also run adsense through those sites and in turn should verify they are yours.

The problems start when scrapers take your content and your ads appear on their site. You as it's your ad you'd get the revenue from it. So this is one way to hamper such things - and increase Googles revenue from illicit clicks - which in turn is meant to protect you.

Finally there's an option on many sites to include your Adsense code to get a share of the revenue on content you've produced. Blogging platforms or some wiki style sites allow the content creator of the page to have an adblock with their adsense code in it as a reward. Again, the ads.txt would be needed here but can't always be implemented due to the nature of these sites and their set ups.

As a note, the ads.txt warning took about a month to disappear. It's back again this year and I've completely ignored it. If your earnings disappear and you have this warning then you should indeed send them a message and check out your ads.txt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.