Guide to ads.txt Management Functionality
The ads.txt management functionality on the adv.red platform allows publishers to maintain and update their ads.txt files directly from the interface. This is crucial for ensuring transparency and preventing ad fraud by clearly stating which companies are authorized to sell their digital inventory.
Editing ads.txt File Publishers can edit their ads.txt file contents in the provided text box. This file should include lines in the format of domain name of the advertising system, publisher’s account ID, type of relationship, certification authority ID
. For instance:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
indicates a direct relationship with Google.rubiconproject.com, 12345, RESELLER, 0123456789abcdef
indicates a reseller relationship with Rubicon Project.
These entries are used to control which companies are allowed to sell ads on their behalf and to declare the relationship with each of them (DIRECT or RESELLER) as well as provide an optional certification authority ID.
Saving the File After making the necessary updates to the ads.txt content, users click on the “Save ads.txt” button to apply the changes. This action will not only update the file content but also initiate the publishing process.
Publishing the ads.txt File Upon saving, the platform will provide a URL where the updated ads.txt file is hosted. The user should then set up a redirect from domain/ads.txt
to the provided URL. This ensures that when the ads.txt file is accessed, it will fetch the most recent version from the specified URL, allowing ad verification systems to validate the sellers.
Importance of ads.txt Maintaining an accurate ads.txt file is essential for publishers to control their ad inventory and safeguard against unauthorized sales. This public declaration supports the programmatic advertising ecosystem by increasing trust between buyers and sellers.
Site data successfully updated.
How to implement it:
To redirect requests for an ads.txt
file from your domain to another domain (such as from your main website to a CDN) using popular web servers like Apache, Nginx, and IIS, you can configure redirect rules. Here’s how you can set up these redirects using .htaccess
for Apache, nginx.conf
for Nginx, and web.config
for IIS.
Apache
For Apache, you can use mod_rewrite in a .htaccess
file placed in the root directory of your website. Here’s an example of what this configuration might look like:
RewriteEngine On
RewriteRule ^ads.txt$ https://cdn1.adv.red/ads_liberoquotidiano.txt [R=301,L]
This configuration enables the rewrite engine and creates a rule that redirects requests for ads.txt
to https://cdn1.adv.red/ads_liberoquotidiano.txt
permanently (HTTP 301).
Nginx
For Nginx, you need to edit the server configuration, typically found in nginx.conf
or a site-specific configuration file in /etc/nginx/sites-available/
. Add the following:
location /ads.txt {
return 301 https://cdn1.adv.red/ads_liberoquotidiano.txt;
}
This snippet tells Nginx to redirect requests for ads.txt
to the specified URL with a 301 redirect.
IIS
For IIS, you can use URL Rewrite rules in the web.config
file, which should be placed in the root directory of your website. Here’s an example of how you can set this up:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect ads.txt" stopProcessing="true">
<match url="^ads.txt$" />
<action type="Redirect" url="https://cdn1.adv.red/ads_liberoquotidiano.txt" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
This configuration sets up a redirect rule that matches requests for ads.txt
and redirects them to the new URL with a permanent redirect type.