Programmatic advertising is the main source of income for website owners today. To improve transparency in this area and fight against fraud, the ads.txt initiative was introduced by the IAB Technology Lab. For any publisher, it is therefore recommended to add an ads.txt file.

Founded in 1998, the IAB (Interactive Advertising Bureau) is an organization bringing together players in internet advertising. Among its missions: the structuring of the communication market on the Internet. It develops standards, conducts research and provides legal support to players in the advertising industry.


  • 1 About the ads.txt file
  • 2 Structure and format of the ads.txt file
  • 3 Create and add an ads.txt file to the root of the site

About the ads.txt file

In English, the term Advertising (publicity) is often abbreviated “ Ad ”. In other words, when we speak of “Ad”, we are already referring to advertising. In the case of the ads.txt file, the “ ads  ” is an acronym for “  A uthorized Digital Sellers for Web ”.

It is a file that the publisher adds to the root of his website and in which are listed all the suppliers authorized to sell his inventory. The ads.txt file can be explored by supply-side marketplace and platform managers, as well as other buyers and third-party vendors.

It is strongly recommended that any publisher add an ads.txt file to the root of their site and make it publicly accessible by crawlers and humans. Some advertising agencies are even prohibited from displaying ads on sites without an ads.txt file.

Structure and format of the ads.txt file

An ads.txt file can contain single or multiple entries and each of them has a number of records. It can be created using a classic text editor, Windows Notepad for example, and saved in .txt format . Each entry includes:

See also  Introduction to web writing: what you need to know
  • The seller’s site/domain name.
  • The publisher’s account ID.
  • The type of relationship with the supplier, DIRECT or RESELLER.

These are the three main records contained in the lines of the ads.txt file. However, there may be other elements, such as the identifier of the advertising network, or a comment. The different elements are separated by commas and are arranged by line.

Here is an example of an ads.txt file:, pub-0123456789012345, DIRECT, f08c47fec0942fa0, 000000, DIRECT, 0000, RESELLER, 00000a000X, DIRECT, 0123456789, RESELLER, 000000, RESELLER

If you only use Google AdSense to monetize your site, then your ads.txt file should only have one entry, one line. Visiting it ( ), this is what your ads.txt file would look like:, pub-0123456789012345, DIRECT, f08c47fec0942fa0
  1. : The seller’s domain name, Google AdSense.
  2. pub-0123456789012345 : Your username as a publisher.
  3. DIRECT : The type of relationship with the supplier. DIRECT means that the management of your inventory is handled by you, through your publisher ID.
  4. f08c47fec0942fa0 : The identifier of Google AdSense as an advertising system.

If you want to add an ads.txt file to your site, place it in the root directory. That is, in the main folder of your domain. Avoid placing it in a sub-folder, otherwise it will not be found. It should be accessible by visiting .

Create and add an ads.txt file to the root of the site

To create and add an ads.txt file to your site, open your text editor. On Windows, search for and launch Notepad . If you are on macOS, launch TextEdit . Enter the items to add to your file and save it to your computer.

See also  Why start a blog in 2022 ?

Save it with the name “  ads  ” and in “ .txt ” format  . Then access the root of your site via CPanel, FTP or as you are used to. Import your newly created ads.txt file. Add it to the root of the site and go check if everything is going well.

To check if it is added and accessible, type in your browser: ”  “.

Create and add an ads.txt file

As in the screenshot above, your browser should display a page with all the entries in your ads.txt file. If not, it means you need to review the name you gave your file or its location on the server.

Once added and accessible, different crawlers will start visiting it. You can modify it at any time to add new entries or delete others. You can also delegate the management of your ads.txt file to third parties, such as AdsTxtMananger .

5/5 - (1 vote)

Tagged in:

About the Author

SAKHRI Mohamed

Founder & Editor

Passionate about the web, new technologies and IT, I share on tutorials, tips, advice, online tools and software for Windows, Mac and Linux. I'm the founder of this blog and I'm very interested in anything to do with technology, but I also love playing games. I was born in Constantine, but now I live in Algiers/Algeria

View All Articles