Ads.txt

Updated: 03/15/2025 by Computer Hope

Short for Authorized Digital Sellers, ads.txt is a text file and initiative from IAB (Interactive Advertising Bureau) Tech Lab introduced in 2017. It helps websites specify authorized ad sellers, reducing fraudulent advertising. When someone claims they can sell ads on a company's website, this file can be verified to ensure they're a legitimate seller.

Ads.txt file format

The ads.txt file must be placed in the root directory of a domain (e.g., computerhope.com/ads.txt) and follow the format outlined below.

<FIELD #1>, <FIELD #2>, <FIELD #3>, <FIELD #4>

or

<VARIABLE>=<VALUE>

When using the first example, each of the field values would be the following.

  • Field #1: Domain name or the advertising system.
  • Field #2: Publisher's account ID.
  • Field #3: Type of account or the relationship. Using "DIRECT" indicates that the publisher directly controls the account. Using "RESELLER" indicates that the publisher has authorized another entity to control the account.
  • Field #4: Certification identifier.

For example, the following is an example of a direct advertiser in the ads.txt file.

google.com, pub-3999293766533555, DIRECT, f08c47fec0942fa0

Any comment is denoted by the octothorpe character (#). If the line begins with this character, the complete line is the comment and is ignored.

When using a variable, as of v1.1 the supported variables are: CONTACT, INVENTORYPARTNERDOMAIN, OWNERDOMAIN, and SUBDOMAIN.

How can I create an empty ads.txt file?

You can create an ads.txt file indicating no authorized sellers using a placeholder record. Below is an example of a placeholder record.

placeholder.example.com, placeholder, DIRECT, placeholder

What's done after adding the ads.txt line?

After the advertiser or reseller information is added to the ads.txt file each page where ads should appear must contain the necessary JavaScript ad tags. This information may be from AdSense, AdX, or another SSP (Supply-Side Platform).

Advertising terms, Computer acronyms, Internet terms, Robots.txt