How to create an ads.txt file?

In the previous post, we explained about what ads.txt is and why you should be concerned about it as a publisher. In this post we explain how it can be created and how to verify if your ads.txt file follows the format.

How to create ads.txt file ?

The HTTP Content-type should be ‘text/plain’, any other Content-type will be treated as an error or will be ignored.

You need to include a separate line in the file for each authorized seller.

You can add comments or variables, however, these values will not be processed.

Each line in a publisher’s ads.txt list requires three pieces of data (plus a fourth optional field) separated by a comma.

The following is the syntax for the ads.txt file:

<SSP/Exchange domain name>,<Publisher id>,<Account relationship (Direct /Reseller)> ,<Certification id (optional)>

Example: google.com, pub-XXXXXXXXXXXXXX, Direct, 7de89dXXXXXXXX

The following explains each parameter in the field:

Parameter What it means
SSP/ Exchange domain name Here you need to update the domain name of the SSP or the exchange ( For example if google is your ad exchange, then you need to update the value as google.com and let’s say if you are working with the SSP rubicon, you need to update the value as Rubicon.com)
Publisher id This is an alphanumeric value that your exchange provides you. For example if you are using DFP , your value will be of the following format “pub-XXXXXXXXXXXXXX” Similarly, you will find this information in the Account settings of each SSP.
Account relationship Currently, there are only two values which will be processed – Direct/ reseller. Any value apart from this will result an error.
Direct: This is a direct business contract between the publisher and the advertising system, that is you as a publisher have direct control over the account for the mentioned SSP/ Exchange

Reseller: This indicates that you have authorized another entity to control the account and resell your ad space via the system.

Example if you control your ssp/google account, you need to update the value as Direct
If a third party controls you SSP/google account, you need to update the value as Reseller.

Certification id This is an Certification authority id that your exchange/ssp provides you if they have registered with TAG. This value is alphanumeric and is optional.

For example for google accounts tag id is f08c47fec0942fa0.

Validation and Verification:

Automatad has designed Verifyadstxt tool to help the publishers identify the errors easily and validate their ads.txt file. The ads.txt file helps you protect your brand from counterfeit inventory that is intentionally mislabelled as originating from a specific domain, app, or video. Declaring authorized sellers can help you receive more advertiser spend that might have otherwise gone toward counterfeit inventory.

What verify ads.txt can do

It can validate:

– If your ads.txt file follows the syntax.
– Exchange URL
– Account relationship (Direct/ Reseller)
– Variable names that are valid

What verify ads.txt can’t do.

It cannot validate:

– Your publisher id
– The certification id
– Variable values

Feel free to explore our free tool online. By creating the ads.txt, you have already taken the first step towards building a better and safe internet experience!

Leave a Reply

Your email address will not be published. Required fields are marked *