Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Overview
ads.txt (Authorized Digital Sellers) is an initiative from IAB Technology Laboratory. It specifies a text file that publishers host on their web servers, listing other companies authorized to sell their products or services.
...
Replace
{domain}
with the actual website domainThe protocol can be either HTTP or HTTPS. The file is available through an HTTPS and HTTP connection. However, it is advisable to prefer HTTPS connections over HTTP when crawling ads.txt files
The ads.txt file is automatically updated on the CDN to reflect the latest state of the website setup. The website must always use the latest ads.txt version available to maximize revenue.
How to implement ads.txt
Direct hosting
You can host There are several ways to add an ads.txt directly on your web server by downloading the latest ads.txt delivered through the Snigel CDN and adding it to your root domain and any subdomains as needed.file to the website or app, depending on the CMS or service that is used.
It is recommended that the ads.txt file is updated regularly, either manually or by implementing an automatic download or synchronization job.
Required HTTP response headers
The ads.txt file must be accessible via HTTP and/or HTTPS from the website path /ads.txt
.
The HTTP response needs to contain the following headers to be accepted by the advertiser's crawlers:
Content-Type: text/plain; charset=utf-8
Additional implementation details can be found in the official IAB ads.txt specification.
to use the Redirect option, because:
ads.txt will always be up to date, ensuring an optimal configuration and improving revenue
No additional effort to manually update the file or implement automatic updates
Redirect
The recommended method of ads.txt hosting is to redirect /ads.txt to the Snigel CDN ads.txt file.
The IAB ads.txt specification allows multiple redirects within the scope of the website’s root domain, but only a single redirect to a destination outside the original root domain. In addition, it authorizes the response to have the following status codes: 301, 302, and 307. The redirect must be implemented as a single hop to the Snigel CDN.
Implement Redirect on CMS
Many of the available CMSs in the market support redirect, and since some will even override CDN settings, this is the advised place to do the redirect whenever possible.
Implement Redirect on CDN
If the website is delivered through a CDN, like for example Cloudflare, implement the redirect on the CDN level through the CDN provider UI or API. Consult your CDN provider's documentation on how to implement redirects.
Cloudflare Guide: https://support.cloudflare.com/hc/en-us/articles/4729826525965-Configuring-URL-forwarding-or-redirects-with-Page-Rules
Note |
---|
Traffic must pass through Cloudflare for Page Rules to work. If you only use Cloudflare for DNS, Page Rules are not active. |
Implement Redirect on Apache Web Server using .htaccess
If the website is using Apache as a web server, implement the redirect in the .htaccess
file by adding the following line:
...
This will instruct the web server to return a permanent redirect 301 to the ads.txt file on the Snigel CDN.
Direct hosting
You can host ads.txt directly on your web server by downloading the latest ads.txt delivered through the Snigel CDN and adding it to your root domain and any subdomains as needed.
It is recommended that the ads.txt file is updated regularly, either manually or by implementing an automatic download or synchronization job.
Required HTTP response headers
The ads.txt file must be accessible via HTTP and/or HTTPS from the website path /ads.txt
.
The HTTP response needs to contain the following headers to be accepted by the advertiser's crawlers:
Content-Type: text/plain; charset=utf-8
Additional implementation details can be found in the official IAB ads.txt specification.
Validate Ads.txt
Test that ads.txt is publicly accessible on the URL:
...
If you have implemented ads.txt using a redirect to the Snigel CDN, you should see in the browser address bar http://cdn.snigelweb.com/adengine/{domain}/ads.txt
or https://cdn.snigelweb.com/adengine/{domain}/ads.txt
.
The browser should show an ads.txt file similar to the following example:
...