Skip to content

ads.txt for publishers: what it is and how to set it up

, 4 min read

Many publishers see "ads.txt" in a setup guide and are not sure what it does. The file is small, but it can decide whether buyers trust the ad space on your site. In this article you will learn what ads.txt is, how to read one line, and how to publish and maintain the file safely.

What ads.txt is

The name stands for Authorized Digital Sellers. It is a plain text file that you place on your own website. The file lists the companies that you allow to sell your ad space. The IAB Tech Lab created this open standard, and anyone can use it for free.

Think of it as a guest list at the door. You write the list, and buyers can read it. If a company sells your space but is not on your list, a careful buyer can see that something is wrong.

Why it matters for publishers and buyers

Some bad actors pretend to sell space on a real website that they do not own. This is called domain spoofing. The buyer pays, but the money never reaches the real publisher, and the ad may appear somewhere else. Advertisers lose budget, and publishers lose trust.

A public list makes this harder. Buyers and their technology can compare who is selling your space with the list you published. For you, a correct file means fewer reasons for buyers to skip your inventory. It does not promise more demand or income. It only removes one doubt. A missing or broken file can make some buyers cautious about your site, so it is worth getting right.

Setting up ads.txt
  1. Get the exact lines from each partner
  2. Paste them into a plain text file
  3. Save the file as ads.txt
  4. Upload it to the root of your domain
  5. Open it in a browser and confirm

How to read one line

Each line describes one seller relationship. Fields are separated by commas. A line can also end with a comment that starts with the # sign. Here is an invented example: adsystem.example, 12345, DIRECT, abc123. The domain and ID are made up for teaching.

How to set it up, step by step

Setup is simple, but each detail matters. A small typo can make a line useless. Follow the order below and take your time.

First, ask each partner that sells your space for its ads.txt lines. Copy them exactly. Do not change the account ID. Next, create a text file named ads.txt with a basic text editor, not a word processor. Paste the lines, one per line. Save it as plain text.

Then upload the file to the root of your main domain. Buyers look for it there, not inside a sub-folder. Open the address in your browser to check. You should see plain text, not a web page, not a login screen and not an error. Finally, wait for your partners to confirm that they can read it.

Common mistakes and ongoing care

Typing lines by hand causes most errors. Other common problems are saving the file as a web page, putting it on a sub-domain only, or having a content system that redirects the address to a home page. Extra characters and missing commas also break lines.

Treat the file as a living document. When you add a partner, add the lines. When you stop working with one, remove the lines. Keep a short note about who asked for each line, so you can review them later. Only trusted people should be able to edit the file, because a stranger who changes it could authorize sellers you do not know.

If you publish an app, the idea is the same but the file is called app-ads.txt. You place it on the website of the developer that is listed in your app store page. Check each store's current rules for the exact steps.

ads.txt is one part of a wider set of checks. A related standard called sellers.json lets ad systems publish who they sell for. The SupplyChain object shows the path a bid request took. Together these help buyers verify the chain from your page to their ad.

Terms used in this article

ads.txt
A public text file on a website that lists the companies allowed to sell that site's ad space.
Domain spoofing
A fraud method in which a seller pretends to offer ad space on a website that it does not own.
DIRECT
A label meaning the publisher controls the account named on that line.
RESELLER
A label meaning the publisher allows another company to resell its ad space through that account.
sellers.json
A file published by an ad system that lists the sellers it works with, so buyers can cross-check them.
app-ads.txt
The version of ads.txt for mobile apps, placed on the developer's website.

Wrap-up

ads.txt takes little time to set up, and it helps buyers feel sure about who sells your space. Today, open your own file in a browser and compare it with the partners you actually use. Fix typos, remove old lines, and add any that are missing.

Further reading

Prepared by the DIGIWEBS team with the help of AI writing tools. General information only, not legal, tax or financial advice. Images by DIGIWEBS Media.

Keep reading