What is an ads.txt file?

1st July 2018

If you monetize your website using advertising you will have heard a lot about ads.txt files lately. An abbreviation for 'Authorised Digital Sellers', ads.txt files are the online advertising industry's latest tool in the battle against ad fraud.

The ads.txt specification has been developed by the IAB Tech Lab, in collaboration with major ad networks.

What is the 'IAB Tech Lab'?

IAB Tech Lab

The IAB Technology Laboratory is a non-profit consortium charged with producing and helping companies implement technical standards and solutions for the digital media and advertising industries. The organization's founding members include AppNexus, Google, PubMatic and Yahoo, amongst others.

How do 'ads.txt' files work?

Just like a robots.txt file on your website, the ads.txt file is created at the root of your domain (e.g. http://domain.com/ads.txt). The file is a standard plain-text file which simply contains a list of ad network domain names, each with an associated ID.

The purpose of the file is to give advertisers and advertising networks the ability to verify who is allowed to sell advertising on your website. This process is automated using 'crawlers', which are automated computer programs which index ads.txt files, much like a search engine. This information is then used by advertisers and ad networks, with this process normally being automated as part of the ad buying process.

What does an 'ads.txt' file look like?

Example ads.txt file:

google.com, pub-0011223344556677, DIRECT, a00b11c22d33e44f
openx.com, 123456789, reseller

The above example shows a basic ads.txt file with two records:

  • The first record/line authorizes the account pub-0011223344556677 to sell advertising on the google.com advertising marketplace, the second line allows the account 123456789 to sell advertising on the openx.com advertising marketplace.
  • The DIRECT text indicates this account is managed by the website owner, whereas the RESELLER text indicates the account is managed by a third-party who is authorized to sell advertising on behalf of the website owner.
  • The fourth element, a00b11c22d33e44f, is referred to as the 'Certification Authority ID' which is a unique ID that identifies the ad network, currently with the Trustworthy Accountability Group (TAG). This fourth element is optional and will likely only be included for the largest ad networks.

An ads.txt file can include comments, by simply beginning a line with a hashtag the rest of the line will not be indexed by crawlers. An ads.txt file can also contain contact information, and if the website uses subdomains then these can be referenced to inform crawlers that additional ads.txt files exist on these subdomains.

google.com, pub-0011223344556677, DIRECT, a00b11c22d33e44f
openx.com, 123456789, reseller
# An example comment
contact=advertising@domain.com
contact=http://domain.com/contact/
subdomain=blog.domain.com
subdomain=news.domain.com

The ads.txt specification specifies that whilst the records in an ads.txt file must follow the defined structure, the basic formatting of the file is not strict. For example, the presence or lack of spaces around the comma delimiters, and the presence of white-space between records will not affect how the ads.txt file is crawled. The text file can be created just like any other text file, using any text editor, on any computer operating system.

How do I create an 'ads.txt' file?

IAB Tech Lab

Firstly, you will need to visit the management system for each advertising network which you have integrated on your website, most will immediately provide information about their ads.txt records which you will need to include in your ads.txt file - usually available as a download. If you can not locate this information, simply contact them to request it.

Once you have gathered the records for your advertising networks simply open a text editor and combine the records from each network. Once done, save the file with the filename ads.txt and upload it to the root of your website domain (e.g. http://domain.com/ads.txt), this will usually mean placing the file in your /public_html/, /httpdocs/ or equivalent directory.

Once you've created/uploaded your ads.txt file, simply submit it to the ads.txt Guru Validator to verify the file is properly formatted.

Alternatively, if you want to avoid the hassle of manually creating ads.txt files you can use ads.txt Guru to automate the process of creating ads.txt files, and to enable quick and easy collaboration with your advertising networks.

Do I need an 'ads.txt' file?

If you sell advertising on your website, yes. If you haven't already created an ads.txt file you will already be missing out on revenue, as major advertising networks will be unable to sell advertising on your website and have already begun the process of blocking ad sales for domains which do not specify they are authorized using their ads.txt file.

The problem of ad fraud is much bigger than you might think, affecting almost every advertising network/exchange. In 2017, Business Insider reported that Google and IAB performed secret tests which found thousands of fake ad listings on major ad networks including AdEx, AppNexus, Oath's BrightRoll and PubMatic, within just 10 to 15 minutes of testing.

According to AdAge, Business Insider said in one instance an advertiser thought it had purchased $40,000 worth of Insider ad inventory through open exchanges when in reality, the publication only saw $97. The rest, Insider said, went to fraud.

This problem of ad fraud is so big that the major ad exchanges are now totally committed to the use of ads.txt files and simply will not allow advertising to be sold without the appropriate ads.txt records, and according to Digiday, major ad networks are now dropping their top publishers who fail to comply.

Do 'ads.txt' files really work?

Yes, and no. The adoption of ads.txt is a great tool to help fight ad fraud, but it's not fool-proof and has created a new problem of ads.txt fraud where fraudulent publishers will contact website owners asking them to update their ads.txt files with fraudulent records. For this reason, it is very important you only ever include ads.txt records which you have sourced from your ad network management systems, or from your trusted contacts at these networks.

The ads.txt Guru system offers additional protection against ads.txt fraud through collaborator certification, which helps you ensure the ad networks you collaborate with can be trusted.

Does every website now use 'ads.txt'?

Statistics from FirstImpression.io in April 2018 show that only 37% of Alexa's Top 1000 have implemented ads.txt files, but of course, it's important to remember not every website uses online advertising, and some that do will handle ad sales directly without using ad networks/exchanges. These statistics also show only 22% of Alexa's top 30,000 websites have implemented an ads.txt file.

What's the future for 'ads.txt'?

As more and more websites adopt ads.txt files it's likely every major ad network/exchange will begin relying on the files to authenticate ad sales, meaning it will become extremely difficult to monetize a website via advertising networks without an ads.txt file in place, and we may well see further changes to the ads.txt specification to further improve and extend its purpose and to simplify the process of managing the files.

It seems ads.txt files are here to stay, and if you are selling advertising on your website it would be foolish to not implement an ads.txt file immediately.

If you would like to automate your ads.txt file management, please sign-up to ads.txt Guru - we provide basic membership completely free of charge, and all our paid plans include a 30 day free trial.