Page 1 of 1

How does ads.txt work?

Posted: Thu Jan 23, 2025 8:17 am
by kumartk
The IAB uses the term “ads” in its ads.txt file as an acronym for “ Authorized Digital Sellers ,” although the term “ad” is often also used as an abbreviated form of “advertising.” In this simple text file, publishers indicate which digital sellers are authorized to offer advertising space on their websites. This gives them greater control over the marketing of their advertising inventory and at the same time offers greater transparency, since it is made clear which platforms they are cooperating with.

The publisher places the ads files in the root directory of the website, that is, in the top bitcoin email address lists directory of the website, where the robots.txt file is also located, which is responsible for preparing the information for search engine crawlers. These crawlers can also process the ads.txt files, which are openly accessible and can be read by both machines and humans .

The file is very easy to find, as it is in the root directory and is necessarily named ads.txt ( example.com/ads.txt ). Therefore, accessing the archives of newspapers such as El País or The New York Times is very simple, allowing advertisers and platforms to check whether the sale of a certain space has been approved by the editor. With this simple file, the task of impersonating a website is greatly complicated for fraudsters, since all parties involved in the purchase and sale of advertising space can check without much effort whether the editor that appears on the sales platform has been impersonated. All you have to do is access the root directory of the original website, that is, the editor, and see if the name of the platform where the advertising inventory is offered is found in the list included in the ads.txt file. In other words, with this text file you can check whether the offer is real or not.

Some selling platforms such as Google have already implemented the standard on their own page. The ads.txt is tracked directly if the supplier has its ad inventory available, so if the platform is not included in the supplier's file, the transaction does not take place.

In summary
The purpose behind ads.txt only works if everyone involved agrees to the standard. If a publisher does not include this file, the chances of becoming a victim of fraud increase greatly, as it is very easy to impersonate. That is why advertisers are advised to work only with publishers who use ads.txt.

Structure of ads.txt file
Since ads.txt is a plain text file, you can also use a simple text editor to create it. To do so, you need to specify four fields about the authorized platform, although only three of them are mandatory:

Advertising system domain name : This is the domain of the company approved for selling advertising inventory. It is usually easy to find this domain, otherwise it is enough to contact the supplier. For Google offers, google.com is always the correct domain.
Publisher Account ID – If a publisher is registered on a particular platform, they must have a specific ID. This ID will be provided in transactions.
Seller relationship type: Two values ​​can be entered in this field. If DIRECT is indicated, it is the publisher who is responsible for managing their inventory on the platform, through the account listed in the second field. The RESELLER entry indicates that the publisher has commissioned a third party to manage said inventory.
Issuing authority ID (optional) : When the advertising system is located at a certification authority, the corresponding ID can also be indicated. For example, in the case of the Trustworthy Accountability Group (TAG), the TAGID would be indicated.
These four fields are indicated on the same line of text, separated by commas . If you want to enter explanations that bots cannot view, you must exclude them with the hash character ( # ), so that everything that follows this character is ignored. If the character is at the beginning of a line, it will be completely ignored.

In addition to seller information and reviews, this standard allows for two other indications: CONTACT and SUBDOMAIN. Both values ​​are entered in the variable=value format, such as CONTACT=example.com/contact . While the first indication provides contact information, the second indicates the ads.txt file on a subdomain. Without this annotation on a second text file, it would be missed by bots, who normally only crawl the root directory of the main domain.

How to create an ads.txt file?
The number of platforms you work with should influence your decision to create an ads text file yourself or let others create one, although in the beginning, it requires very little effort. As a publisher, if you want to create an ads.txt file to avoid falling victim to fraudulent activities, you just need to follow a few simple steps:

In a text editor (such as the native one on Windows systems or TextEdit on Mac) the necessary parameters for each platform are entered. In the example below, advertising spaces for a fictitious blog are sold on Google.

Made
It doesn't matter whether you use Google AdSense, DoubleClick for Publishers, or Ad Exchange: the domain name is still google.com .

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0 #AdSense
google.com, pub-0000000000000001, DIRECT, f08c47fec0942fa0 #Ad Exchange
contact=[email protected]
The second field of both entries specifies that the publisher is listed with two different Google accounts. Both identifiers follow the same scheme: in the second module, pub- (from publisher) is always accompanied by a set of 16 characters. Some publishers have more than one account on the platforms to log in to different tools such as AdSense and Ad Exchange, as is the case in this example. The third field indicates that it is the publisher who manages the inventory, and since Google has a unique TAGID, this is also included.

Advice
Many platforms focused on programmatic marketing work with the ads.txt standard. If a publisher does not know the specifications to be entered into the text file in order to be verified, they can find the required information either in the help or documentation section of the website or by contacting the provider directly.

In order to increase transparency and provide more information to interested parties, comments can be added regarding the type of accounts being dealt with. An email address is also indicated at the end in case it is necessary to contact the editor.

The different fields to be included in the structure used to designate each sales platform follow a set order (advertising system domain name, publisher account ID, type of relationship with the seller, issuing entity ID) and in theory cannot include blank spaces, tabs or commas . However, if it is unavoidable to use these elements because, for example, they are part of the ID, it would be necessary to use the URL code: this method, also known as the percent code, uses the ASCII hexadecimal code and places it after the percentage symbol ( %) . Thus, a blank space (which corresponds to the number 20 in the ASCII hexadecimal system) would be represented by the character string %20 .

The publisher can choose the layout of the authorized platforms in the text file. Some of them order the lists so that DIRECT entries are listed first , followed by RESELLER entries .

When saving the file, you should pay special attention to the fact that it is saved as a .txt file with the name ads. This ads.txt is uploaded to the root directory of the server, for example, with the help of an FTP program.

Especially if you work with multiple platforms, it is worth using an online generator . Some offer their services in exchange for the publisher's email address, others simply insert the entries from their own platforms into the text file, such as the DFP network generator on Google.