Home / Guides / ads.txt basics

What is ads.txt and why every website with ads needs it

By the ads-txt.in team · Published November 8, 2026

If you show ads on your website, sooner or later your ad network will ask you to add an ads.txt file. It is a small text file, often just one line long, but it plays an important role in protecting your ad income.

The short answer

ads.txt stands for Authorized Digital Sellers. It is a public list, placed at the root of your domain (for example https://example.com/ads.txt), that names the companies allowed to sell ad space on your site. Advertisers and ad platforms read it before buying, so they can be sure they are paying the real owner of the site and not an impostor.

The problem it solves

In automated advertising, ad space is bought and sold in milliseconds through exchanges. Before ads.txt, it was easy for fraudsters to claim they were selling space on a popular news site when the ads actually ran somewhere else. This is called domain spoofing. Advertisers lost money, and genuine publishers lost the income that should have gone to them. The IAB Tech Lab, an industry standards body, introduced ads.txt in 2017 to close this gap.

What a line looks like

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Each line has up to four parts separated by commas: the ad system’s domain, your account ID in that system, the relationship (DIRECT if you manage the account yourself, RESELLER if someone else sells for you), and an optional certification authority ID that identifies the ad system. Our guide to DIRECT and RESELLER explains the third field in detail.

Who reads your ads.txt

Ad exchanges, demand-side platforms used by advertisers, and ad networks such as Google AdSense crawl the file regularly. If your file is missing, or does not list a seller, many buyers will skip your inventory. That means fewer bids and lower earnings.

Is it required?

ads.txt is not a law, and your site will still load without it. But many ad platforms strongly recommend it, and buyers increasingly avoid sites without one. Google AdSense, for example, shows an “Earnings at risk” alert when it cannot find a correct ads.txt file. In practice, every site that earns from programmatic ads should have one.

How to create one

Use our ads.txt generator to build the file, upload it to the root folder of your website, and confirm it is reachable with our ads.txt checker. The whole process usually takes less than ten minutes.

Related guides