Press enter to see results or esc to cancel.

Create, Edit and Check ads.txt

ads.txt is a simple text file that you may place in the root of your domain (for example https://example.com/ads.txt). This is a simple, flexible, and secure method for publishers and distributors to declare who is authorized to sell their inventory, improving transparency for programmatic buyers.

ads.txt supports transparent programmatic digital media transactions and can remove the financial incentive from selling counterfeit and misrepresented media. Similar to robots.txt, ads.txt can only be posted to a domain by a publisher’s webmaster, making it valid and authentic. As a text file, ads.txt is easy to update, making it flexible. Because publishers sell their inventory through a variety of sales channels, ads.txt supports the following types of supplier relationships:

  • Domain owners who sell on exchanges through their own accounts
  • Networks and sales houses who programmatically sell on behalf of domain owners
  • Content syndication partnerships where multiple authorized sellers represent the same inventory

IAB Technology Laboratory provides more detailed information on ads.txt file. Check also ads.txt specifications.

Creating and editing ads.txt file

Ad Inserter has a simple ads.txt viewer and editor. You can quickly create, check and edit ads.txt file. You can also easily add lines with account IDs from ad codes found in Ad Inserter blocks. To check ads.txt file go to general plugin settings (tab ) and click on the ads.txt button:

ad inserter ads.txt button

You will see a table view of the items in the current ads.txt file:

ad inserter ads.txt table

Ad Inserter will also scan all your blocks and extract known advertising systems (for example, AdSense). For each advertising system found, Ad Inserter will highlight line in the table:

  • Green lines show Account IDs found in blocks and present in ads.txt file
  • Red lines show Account IDs found in blocks but not present in ads.txt file
  • White / gray lines show other lines found in ads.txt file

Each line in the ads.txt file will show the following fields:

Advertising system

This is domain name of the advertising system – the canonical domain name of the SSP, Exchange, Header Wrapper, etc system that bidders connect to. This may be the operational domain of the system, if that is different than the parent corporate domain, to facilitate WHOIS and reverse IP lookups to establish clear ownership of the delegate system. Ideally the SSP or Exchange publishes a document detailing what domain name to use.

Account ID

This is publisher’s Account ID – the identifier associated with the seller or reseller account within the advertising system in field Advertising system. This must contain the same value used in transactions (i.e. OpenRTB bid requests) in the field specified by the SSP/exchange. Typically, in OpenRTB, this is publisher.id. For OpenDirect it is typically the publisher’s organization ID.

If you are using AdSense ads this field will contain your Publisher ID (pub-xxxxxxxxxxxxxxxx). Please note that Publisher ID should start with pub-.

Type

Type of Account / Relationship – an enumeration of the type of account. A value of DIRECT indicates that the Publisher (content owner) directly controls the account indicated in field Account ID on the system in field Advertising system. This tends to mean a direct business contract between the Publisher and the advertising system. A value of RESELLER indicates that the Publisher has authorized another entity to control the account indicated in field Account ID and resell their ad space via the system in field Advertising system. Other types may be added in the future. Note that this field should be treated as case insensitive when interpreting the data.

Cetification authority ID

An optional ID that uniquely identifies the advertising system within a certification authority (this ID maps to the entity listed in field Advertising system). A current certification authority is the Trustworthy Accountability Group (aka TAG), and the TAGID would be included here.

Click on valid TAGID will open Trustworthy Accountability Group page for the Advertising system.

The toolbar above the table has a search field to limit rows in the table. When you eneter search keywords the table will show only the lines that contain all your search keywords.

ad inserter ads.txt table toolbar

Buttons in table view (hover the mouse over the button to see the function):

  • Switch to editor
  • Switch to table view (highlighted)
  • Open saved ads.txt file in a new window
  • Reload ads.txt file

If no ads.txt file is found the deafult view is editor where you can create ads.txt file.

When you need to edit ads.txt switch to editor mode:

ad inserter ads.txt editor

There are two windows. The upper optional and read-only window shows missing lines in ads.txt file. Ad Inserter will scan all your blocks and extract known advertising systems. For each advertising system found in blocks but not present in ads.txt file, Ad Inserter will generate a line for ads.txt file. You can simply copy these lines to the ads.txt file below.

For example, for AdSense you need to have the following line in ads.txt file:

google.com, pub-xxxxxxxxxxxxxxxx, DIRECT, f08c47fec0942fa0

pub-xxxxxxxxxxxxxxxx is your AdSense Publisher ID which should start with pub-. Check also Google documentation on AdSense and ads.txt.

The lower window shows actual ads.txt file as found in your WordPress instalaltion folder. Here you can add, remove or edit lines in the file. Once you are happy with it you need to save the file (the first button in the toolbar above):

ad inserter ads.txt editor toolbar

Buttons in editor view (hover the mouse over the button to see the function):

  • Save ads.txt file
  • Switch to editor (highlighted)
  • Switch to table view
  • Open saved ads.txt file in a new window
  • Reload ads.txt file

ads.txt file must be placed on the root domain. If the plugin detects that your WordPress is installed in a folder it will show a warning. You will be able to view and edit ads.txt file in this folder, however, it is your responsibility to make sure the root domain will contain the right ads.txt file.

It is also possible to use virtual ads.txt file – your website will have a redirection for ads.txt file to some online service (for example Ads.txt manager) that will serve ads.txt file for your website. In such case the file is not present on your folders and you will not be able to edit it with Ad Inserter. Use the editor of your virtual ads.txt file.