Programmatic Primer: A Guide to Ads.txt

Launched in 2017, ads.txt is an industry-wide initiative which aims to improve transparency and combat fraud by allowing publishers to specify the parties which are authorized to sell their inventory. Here’s what publishers need to know about ads.txt.

Programmatic advertising has seen huge growth over the last decade, but it’s not been without its growing pains. With publishers, brands, agencies, vendors, and other intermediaries all staking a claim in the programmatic supply chain, it was always a matter of time until some level of regulation and anti-fraud measures were put in place. 

What is ads.txt?

In spring 2017, the IAB Tech Lab took up the challenge of fighting fraud by presenting the industry with a solution called ads.txt (Authorized Digital Sellers)

In the most simple terms, ads.txt is a plain text file hosted by publishers which lists all of the exchange / SSP accounts which are authorized to run auctions for their inventory. Ads.txt files are openly visible by simply navigating to a publisher’s website and adding “/ads.txt” to the top-level domain. 

When buying media, if a DSP sees a bid request from an exchange which isn’t listed on the domain’s ads.txt file, it can simply disregard it. In this way, ads.txt enforces a far more transparent path to supply, giving media buyers the confidence to know that the supply they’re buying is genuine. 

In terms of adoption, a significant proportion of programmatic players have embraced ads.txt, with 44% of the Alexa top 1000 global websites (not just those running programmatic) having an ads.txt file present as of 2022. Much of this has been driven by some of the industry’s biggest players, including Google, only allowing programmatic buys to take place from ads.txt enabled publishers. 

Why was ads.txt created? 

With over 100 billion dollars spent each year on programmatic display in the US alone, the programmatic supply chain makes for a natural target for fraud and bad actors. 

Prior to the introduction of ads.txt, there was a lack of transparency around supply for media buyers, with various types of fraud running rampant throughout the supply chain, such as:

  • Unauthorized reselling, also known as arbitrage, where ad impressions are purchased for one price, then immediately resold at a higher price without the permission of the media owner.

  • Domain spoofing, also known as counterfeit inventory, occurs when sellers intentionally mislabel inventory so that buyers believe it to be from a certain brand or publisher when in reality it is not. It’s also used as a means to drive invalid traffic to artificially inflate inventory value.

To avoid falling into these ad fraud traps, and to ensure their ad dollars were assigned to the right publisher, media buyers - before ads.txt - would have had to contact every publisher individually to ensure a specific SSP was authorized to sell their inventory. 

The simple addition of a text file onto the publisher domain made all of this legwork unnecessary, bringing a welcome shot of transparency to the programmatic supply chain. Likewise, for publishers, the use of ads.txt means that they can be sure where their inventory is being sold and by whom, which secures their revenue streams.  

The anatomy of an ads.txt file

Now that we know about the concept behind ads.txt and why it exists, let’s dig into the details of how it works. 

Elegantly simple in its design, an ads.txt file is a straightforward list of SSPs and exchanges who are authorized to sell inventory for that domain. An example of a single line in an ads.txt file might look like this:, ABC123, DIRECT, 12c6522e9943c88e

or..., ABC234, RESELLER, 44d5422f5542t64a

Let’s break down the anatomy of this ads.txt line item. Each one is made up of the following four core fields:

  1. The domain name of the exchange, SSP, or ad network. In the example above, this is

  2. The next element of this ads.txt entry is the account number (or seat ID) of the publisher with this particular exchange or SSP. So, in the example above, the publisher would have an account with ID “ABC123” set up with The MediaGrid SSP .

  3. Next, you’ll see either “DIRECT” or “RESELLER”. Things get a little trickier here, but the simplest way to think about is that a DIRECT entry means the publisher has an immediate relationship with the SSP, whereas a RESELLER entry means the publisher has authorized a third-party (like an ad network or ad management company) to resell on their behalf. 

  4. Finally, the alphanumeric code at the end of the line is an optional field which refers to the SSP’s certification status by a Certification Authority ID such as the Trustworthy Accountability Group

While the vast majority of ads.txt lines you’ll see will be made up of these four fields, there are some additional fields available for more nuanced implementations. 

For example, you might want to specify a contact person or host your ads.txt file in a subdomain. All of these variables are supported and you can get a complete technical overview from the latest Ads.txt 1.1 specification document, published in April 2022

Looking for new ways to monetize your inventory via premium demand sources, or need help preventing ad fraud and securing your revenue? Learn more about connecting with The MediaGrid today.

The Publisher Brief: OpenRTB 2.6 and the Addressable Future of CTV
April 26, 2022
How Curated Demand Drove a 57% Lift in Revenue for CafeMedia Publishers
April 26, 2022