Skip to content
Digital marketing · Digital planning

What is ads.txt?

Learn what ads.txt is and how it can help you control who is authorized to sell ads on your site, helping combat the "underground market" for digital ad inventory.

What is ads.txt?

ads.txt is an IAB initiative in which a text file (TXT), short for Authorized Digital Sellers , is created and hosted on your domain. It should be hosted at the root (e.g., https://www.mydomain.com/ads.txt) and helps ensure that your digital ad inventory is sold only by sellers previously identified as authorized.

What does this mean?

By creating an ads.txt file, you have greater control over who is authorized to sell ads on your site, helping combat the "underground market" for digital ad inventory.

Is it mandatory to use ads.txt?

Using an ads.txt file is recommended but not mandatory. Creating one helps protect the brand against inventory that somehow pretends to come from a particular website, app, or digital media outlet (for example, video).

Why is it important to use it?

When an advertiser buys programmatic media, they currently have no guarantee that the ad slots they purchased were legitimately supplied by the publishers. Using ads.txt changes that.

The first step to getting started is simple and can be done using your computer's Notepad.

A simple text file called ads.txt is created. The information added to it clarifies which partners are authorized to sell each publisher's ad slots and helps prevent the purchase of "fake" or illegitimate inventory.

What information should be included in ads.txt?

The ads.txt file must contain one line for each authorized seller. Each line contains four sets of data, separated by commas. The first three are required, and the last is optional.   <Data #1>, <Data #2>, <Data #3>, <Data #4>
  • <Data #1>: Required. The domain name of the advertising system. For example, for Google accounts, the domain is always google.com;
  • <Data #2>: Required. The publisher account ID, or the identifier associated with the seller/reseller account. This field is usually the Publisher ID. For Google accounts, you can find more information on how to locate this ID at this link:
  • <Data #3>: Required. Account type. DIRECT (the content owner) or RESELLER (the publisher has authorized another entity to manage the displayed account).
  • <Data #4>: Optional. Certification authority ID. An ID that uniquely identifies the advertising system within a certification authority. For example, for Google publisher accounts, the TAG ID is f08c47fec0942fa0.

Example of the ads.txt file contents for publishers who work with Google products:

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
google.com, pub-0000000000000000, RESELLER, f08c47fec0942fa0