How to Create Ads.txt files in WordPress
What is Ads.txt?
Ads.txt is a mechanism developed by the IAB Techlab for publishers that helps ensure that your digital ad inventory is only sold through authorized sellers such as AdSense, Doubleclick, and Ad Exchange. It was released in May 2017 with an aim towards combating specific types of ad fraud. This is mainly targeted towards ad frauds like domain spoofing and illegitimate inventory recurrences, also aiming to provide transparency.
This helps publishers and advertisers buy digital media spaces with confidence and makes it challenging for fraudulent entities to profit from promoting and selling inventory that doesn’t belong to them.
Why is Ads.txt important?
As stated earlier, ads.txt, also known as Authorized Digital Sellers, aims to oppose domain spoofing and arbitrage, which is a widely known shady practice. Arbitrage is when impressions are bought and then repackaged and resold at a higher price by a third party. In this case, Ads.txt helps to solve by indicating who the authorized resellers of a publisher’s inventory are.
Similarly, domain spoofing or domain hijacking works in two malicious ways by either using malware installed on a user’s computer or by changing the directed URL in the ad tag.
These both malicious activities procure fraudulent benefits as they trick ad networks and other programmatic portals into considering that the user is on a legitimate website, when in fact, the ad actually appears on a different, illegitimate site or is displayed on a page in a hidden web browser.
These tactics are used mainly by piracy websites that have a tremendous amount of bot traffic. This is a shady solution for such websites as otherwise, they will most probably be blacklisted or ignored by advertisers and publishers.
Ads.txt helps improve transparency by allowing publishers to declare who can sell their ad inventory. Hence, Ads.txt helps combat such situations very effectively and thus has been raised as a standard practice advocated by the IAB Techlab.
Google provides a simple guide to tackle ad frauds when using the Adsense network.
How Does Ads.txt Work?
Ads.txt is a file that includes details given by the publisher about all their partners like supply-side platforms, ad exchanges, ad networks, etc.
A typical ads.txt file consists of the following particulars:
Partner1 – This is the ad platform or network that the publisher uses to sell their inventory.
678XXX – This field represents the Seller Account ID, which is also the publisher’s account ID for the respective vendors, and is used to verify the authenticity of the inventory during RTB auctions.
DIRECT / RESELLER – This signifies if the publisher works directly with the vendor to sell its inventory or that the publisher has authorized another company to sell its inventory on their behalf.
g45tg4e – This is an optional field that lists the Certification Authority ID, which identifies the advertising system within a certification authority.
# banner – This is a comment field used by some publishers to include information about which type of inventory the vendor sells.
We can manually check to see if a website has an ads.txt file and view its contents by adding /ads.txt to the end of the root domain, e.g., forbes.com/ads.txt
Once the publisher has added an ads.txt file to their root domain, advertisers can use a Python script to crawl the web and see which publishers have an ads.txt file under their domain.
Once an advertiser has a list of publishers that uses ads.txt, they can reference this list with IDs in OpenRTB bid requests.
Thus, if the Seller Account IDs matches, then the advertisers know that the publisher is genuine. If they don’t match or don’t exist, then it could mean that the domain is not coming from an authorized dealer or that the publisher hasn’t implemented ads.txt, and the buyers can choose not to bid on that particular inventory.
How to add Ads.txt file in WordPress without plugin?
To add an ads.txt file without a plugin, you must first create the file.
You can create the file by first logging into Google Adsense. Now, click on the ‘fix now’ button on the earnings at risk notice that appears on top.
A pop-up message will appear, giving you two options to either download or manually enter the codes.
Click the download button. The ads.txt file will be downloaded to your computer hard drive.
Now, you’ll have to upload the file on your Cpanel root dictionary.
Login to your WordPress Cpanel. Now, open the file manager and search for “public_html”.
Click on the upload button and select the ads.txt file to upload. Save and exit.
That’s it. Using these steps, you can add an ads.txt file without using plugins.
This, however, is an unnecessary and complicated process that you can avoid, as there are several free and paid plugins available to add the file without any effort.
We suggest you use a plugin to avoid unnecessary confusion and save time.
How to Manage Ads.txt files in WordPress using the WP AdCenter plugin?
WP AdCenter is a WordPress Ads management plugin that brings an extensive list of features to help you monetize your website using ads from major ad networks. With this simple tool, you can easily insert Google AdSense and other banner ads on the website and manage them seamlessly.
WP AdCenter also helps combat ad fraud with built-in settings to add and verify the ads.txt file.
All you need to do is download and install the WP AdCenter Plugin, which is freely available in the WordPress repository.
Once the plugin is installed, you will be able to see the WP AdCenter tab in the navigation panel of your WordPress dashboard. Under the same, you can navigate to the settings option as seen in the image below.
Next, you need to locate the ads.txt option (which is set to disable by default) and enable it by clicking on the toggle switch.
Once enabled, you can paste the ads.txt data into the ‘Content’ section, as seen in the image.
Click on the Update button to save the contents of the ads.txt file. You can also check the ads.txt file for any problems by clicking on the ‘Check for Problems’ button. If there are any errors detected, the plugin will highlight them and also suggest a solution.
Combating ad fraud is an essential part of advertising and publishing online ads. Ads.txt does not solve the issue entirely, but it does promise a better ecosystem for all parties involved to promote transparency.
Using a plugin like WP AdCenter helps create a protocol to follow and validate such files. Though, the success of ads.txt entirely depends on mass adoption by publishers and advertisers together.