How does ads.txt work?

Ads.txt is simply a text file that sits on your server and lists the places authorised to sell ads on your behalf. The idea is simple: Buyers can collect this data and be sure that if they’re paying for ads on then that is where those ads will appear (see example from .

The file simply lists the accounts that are authorised to sell the inventory, doing so in a format that can be easily crawled and indexed.

To look at ads.txt from a different angle, it is actually more likely to eliminate other ad companies that are legitimately being called by the publisher page. This is simply a result of an increasingly complex ecosystem where any given ad call travels from publisher to DoubleClick for Publishers (DFP) to any number of platforms (as seen here).

Ads.txt is a tempting way to simplify this complex path by pushing publishers to publicly list their partners, but the existing implementation of ads.txt illustrates that the reality is more complicated.

What do publishers stand to gain from implementing ads.txt?

If you are the New York Times, the benefit is obvious: Advertisers looking for exposure on your site won’t be tricked into buying misrepresented inventory and you retain control over pricing. As the standard gains more widespread adoption buyers are more likely to require ads.txt for all buys, making it more relevant to less well known publishers too.

What are the side effects of implementing ads.txt?

The initiative is not without some criticism. Ads.txt is designed to bring transparency, but some argue that it is too transparent. Implementing ads.txt shows exactly where you sell your inventory to anyone who cares to look. If you price your ad inventory differently through different channels this allows buyers to shop around for the lowest price

Take, as an example, the ads.txt file for Business Insider :

#Ads.txt, pub-1037373295371110, DIRECT #video, banner, native, app, 10306, DIRECT #banner, 183963, DIRECT #banner, 184913, DIRECT #banner, 537147789, DIRECT #banner, 538986829, DIRECT #banner, 7161, DIRECT #banner, 3364, RESELLER #native, 1325898517502065, DIRECT #video, banner, app, 87, DIRECT #banner, 688168, DIRECT #native, 4139, DIRECT #native, 11643, DIRECT #outstream, 11445, DIRECT #outstream, pub-8415620659137418, RESELLER #native

If I’m buying ads on Business Insider through one of these partners I can easily see where else inventory is available. I even have the relevant account IDs should I care to go comparing prices. Business Insider have even gone one step further and kindly labelled each demand partner with the types of ads they serve, although this is not part of the standard.

Again, these are “big publisher problems” that many independents would like to face, but are important to be aware of.

Should publishers adopt ads.txt?

Compared with other initiatives publishers are encouraged to adopt, the implementation cost of ads.txt is incredibly low. Five minutes work is enough to get most sites compliant, but despite this adoption hasn’t yet been overwhelming.  According to BuiltWith, only 1.8% of the top 10,000 websites currently use ads.txt, compared with over 44% using DoubleClick (not an entirely fair comparison, as both buy and sell side have reason to implement DoubleClick code, but a useful benchmark). Unsurprisingly, adoption is being led by USA, Germany and the UK.

Currently ads.txt is in a bit of a chicken and egg situation. There is not real drive for publishers to implement it until buyers start filtering to only buy from ads.txt supporting sources. Buyers aren’t implementing those filters yet, as there isn’t enough inventory until more publishers implement. Whether or not the initiative will gain enough momentum to get widespread adoption remains to be seen and is likely to be led by major publishers.

There could potentially be an early adopter advantage to those who have ads.txt in place if/when buyers start filtering on its use. The low cost and ease of adoption means that this could suit independent publishers who aren’t concerned about the transparency issue and have the flexibility to rule out change more easily.

Implementing ads.txt for Google ads

Implementing ads.txt is incredibly simple. Create a text file and add one line per authorised partner. On each line add the following three pieces of information, separated by a comma:

  • The domain of the advertising system
  • Your account ID
  • The type of relationship you have with that partner (either DIRECT or RESELLER if you are working through a third party)

There is an optional 4th field which is the TAG ID of the source if they are certified by the Trustworthy Accountability Group.  Once created simply upload that file to your webserver so that it is visible at and you are done.

Ads.txt for Google AdSense

If you publish ads via Google AdSense and want to implement ads.txt you will need to first locate your publisher ID.  This can be found by logging in to AdSense and then navigating to Settings > Account > Account information.  Your publisher ID is in the format of pub-0000000000000000 with the zeros replaced by your own 16 digit number.

The entry in ads.txt for a publisher’s own Google AdSense account will then look like:, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Please note that the TAGID for Google is always f08c47fec0942fa0

Ads.txt for Ad Exchange

The set-up for publishers with their own direct DoubleClick Ad Exchange account is the same, with the ID being found through DFP by navigating to Admin > Global settings > All network settings. Again the Publisher ID is in the format of pub-0000000000000000.

For publishers accessing Ad Exchange through a GCPP (such as OKO) or other third party the process is the same, but they will need to get the publisher ID from their managing partner and specify it as reseller. To take the example of a publisher using their own AdSense account and accessing Ad Exchange through a partner, their ads.txt file will look like the example below (We’ve labelled with a #comment for clarity):, pub-0000000000000001, DIRECT, f08c47fec0942fa0 # own adsense, pub-0000000000000002, RESELLER, f08c47fec0942fa0 # AdX

Follow us on Facebook and Linkedin