Programmatic Advertising
Author: Alise Zaiceva 12 minute read
#Ad Fraud
All Categories >Programmatic Advertising > Ads.txt Guide: Implementation, Benefits, and Best Practices 2024

Ads.txt Guide: Implementation, Benefits, and Best Practices 2024

Ads.txt (short for Authorized Digital Sellers) is a text file introduced by the IAB Tech Lab in 2017 to protect ad inventory and combat programmatic ad fraud, such as domain spoofing and unauthorized ad sales. By enabling publishers to publicly list authorized sellers of their ad inventory, ads.txt creates a transparent ecosystem where advertisers can validate sellers and ensure ad spend reaches legitimate sources.

This initiative has significantly improved trust and transparency within the digital advertising industry. However, despite its proven benefits, many publishers remain hesitant or unaware of how to implement ads.txt effectively.

Latest Developments

  • Version 1.1 Update (2022): Introduced two critical fields:
    • OWNERDOMAIN: Declares the parent company or ultimate owner of the inventory
    • MANAGERDOMAIN: Identifies the entity managing the ads.txt file
  • Sellers.json Integration: Works in conjunction with ads.txt to create a more transparent supply chain
  • OpenRTB Support: Enhanced integration with OpenRTB 2.6 specifications

What is ads.txt used for?

Ads.txt is used for:

  • Identification of who is authorized to sell publishers’ ad inventory.
  • Crawling of publishers’ domains by buyers, ad exchanges, etc.
  • Matching the seller account IDs in bid requests.
  • Protection of advertisers from counterfeit ad inventory

How Does Ads.txt Work?

The publishers add the ads.txt file on the website, confirming their ownership of the domain and indicating partner accounts (such as ad exchanges and SSPs) eligible to sell their ad inventory. As a result, advertisers can easily access the list of all authorized publishers and their ad inventory online.

When the advertiser receives a bid request from the publisher, all he has to do is match the publisher’s account ID with the ads.txt file.

If everything matches, the advertiser can be sure that the publisher is legitimate. On the other hand, if the buyer discovers that the publisher’s ID isn’t validated, he can decide not to bid on the publisher’s ad inventory.

Ads.txt Example

Ads.txt is publicly available and can be checked by typing in the root domain followed by /ads.txt. Here’s an example of the Forbes ads.txt file (it can be accessed at: https://www.forbes.com/ads.txt).

ads.txt example

As you can see from the example, each line of the ads.txt file consists of either 3 or 4 parameters (pieces of data) separated by a comma. 

ads.txt syntax

Here is the explanation for each field:

  • Field #1 (required):

This is the domain name of every SSP/ exchange which is allowed to sell or resell your ad inventory. 

  • Field #2 (required):

This is the identifier that corresponds to your account ID in field #1. It will be unique for every publisher in every SSP/ exchange. 

  • Field #3 (required):

This value can be DIRECT or RESELLER. 

DIRECT: This means that the publisher has direct control over its account for the given SSP/ exchange.

RESELLER: This means that the publisher has authorized a third party to control his account and officially sell his inventory via a given SSP/ exchange.

  • Field #4 (optional):

This is an ID that an SSP / exchange will have if they have registered with the Trustworthy Accountability Group (aka TAG). 

How to Implement Ads.txt?

Implementing ads.txt today is very easy. Watch the video or read the instructions below.

1. How do I add ads.txt to WordPress?

The easiest way to add ads.txt in WordPress is through a plugin. After signing into WordPress, the first step you have to take is to install and activate the Ads.txt Manager plugin. 

ads.txt manager plugin
  1. Go to Settings > Ads.txt to configure the plugin’s settings and insert the necessary data.
  2. Next, add all the necessary data in the text field.

Example:

ads.txt syntax example

Don’t forget to separate each field with a comma.

  1. Click on Save Changes.

2. How to add ads.txt to AdSense?

You can download your ads.txt directly from your AdSense account. 

There are 5 steps how to add ads.txt to Google AdSense:

  1. Sign in to your AdSense account.
  2. Click Sites > Overview.
ads.txt adsense manual
  1. Open the “Create an ads.txt file for…” message.
  2. Click Download. The ads.txt file will be automatically downloaded.
ads.txt adsense manual 2
  1. Upload your ads.txt file to the root directory of your site. Make sure to check the file’s content by typing in your domain’s URL followed by /ads.txt.  

If you don’t see the “Create an ads.txt file for…” message, you may need to manually copy your publisher ID from your account and add it to your ads.txt file. 

You can find your publisher ID in Account > Settings > Account information in the Google AdSense dashboard.

adsense publisher id

Your publisher ID will consist of 16 digits in this format– pub-0000000000000000. 

Now, from your AdSense account:

  1. Click Sites > Overview. 
  2. Open “Add your publisher ID to these ads.txt files” message.
ads.txt adsense manual 3
  1. Click Copy.
  2. Paste ​​the line into each of your ads.txt files with your own publisher ID.

3. How to add ads.txt manually? 

  • Create a text file named “ads.txt”
  • Upload to your root directory via FTP
  • Verify accessibility at yourdomain.com/ads.txt

What Are the Benefits of Ads.txt File?

In 2023, the cost related to digital ad fraud accounted for $84 bln, projecting to reach $172 bln in 2028. Ads.txt helps advertisers verify the sellers and, ultimately, prevent spending money on counterfeit inventory. In turn, publishers receive their share of ad spend that would have otherwise gone to ad fraud. 

Source: Statista

Here are 4 other benefits:

  • Industry Standard: Ads.txt has become an industry standard. Major platforms consider it best practice, and not having it may mean losing access to some demand sources that require compliance.
  • Authorized Sellers: Ads.txt allows publishers to declare which companies are authorized to sell their ad inventory. This protects against unauthorized or illegitimate sellers who may try to sell fraudulent inventory, thus reducing ad fraud.
  • Trust with Advertisers: Advertisers often prefer to buy from publishers who have implemented ads.txt because it ensures that they’re purchasing genuine inventory. Many demand-side platforms (DSPs) and advertisers may avoid bidding on inventory from publishers without an ads.txt file, limiting the publisher’s monetization opportunities.
  • Increased Revenue Potential: Implementing ads.txt can lead to higher demand for a publisher’s inventory because advertisers know their ads are appearing on legitimate websites.

Is Ads.txt Mandatory?

According to Google, ads.txt is not mandatory but is highly recommended. If you have created your ads.txt file, you can ensure that partners who want to sell your ad inventory can be identified.

setupad-ss-blog-banner

Best Practices for 2024

As ads.txt has become a standard in the industry, publishers should follow these best practices to ensure their implementation is effective and up-to-date:

1. Regular Audits

  • Review Authorized Sellers Quarterly: Regularly review the list of authorized sellers in your ads.txt file. Remove any inactive partnerships or obsolete account IDs.
  • Update Account Information: Ensure all publisher account IDs and domain names are current and accurately reflect your active advertising relationships.
  • Monitor for Changes: Set up alerts to detect any unauthorized modifications to your ads.txt file. This will help you quickly identify and address any potential issues.

2. Validation

  • Use IAB’s Ads.txt Validator: Leverage the IAB’s official ads.txt validator to check your file for syntax errors, missing fields, and other compliance issues.
  • Monitor Google Search Console: Google Search Console can provide valuable insights into any errors or problems Google’s systems detect with your ads.txt file.
  • Cross-Check for Compliance: Regularly verify that your ads.txt file adheres to the latest IAB specifications, including the new fields introduced in version 1.1.

3. Security

  • Implement Proper File Permissions: Ensure your ads.txt file has the correct read permissions so that it can be accessed by authorized parties, but not modified by unauthorized users.
  • Use HTTPS for File Access: Configure your web server to serve the ads.txt file over a secure HTTPS connection to prevent tampering in transit.
  • Monitor for Unauthorized Changes: Set up alerts or monitoring to detect any unauthorized modifications to your ads.txt file, which could indicate a security breach or attempt at domain spoofing.

4. Organization

  • Group Entries by Advertising System: Organize your ads.txt file by grouping entries for the same advertising system (e.g., all Google-related entries together, all OpenX entries together, etc.). This improves readability and makes it easier to manage.
  • Add Comments for Clarity: Include comments in your ads.txt file to provide context for each entry, such as the name of the advertising system, the purpose of the partnership, or any other relevant information.
  • Maintain Backup Copies: Keep a backup of your ads.txt file in a secure location, such as a version control system or cloud storage. This will make it easier to restore the file in case of accidental deletion or other issues.

5. Automation

  • Explore API-based Updates: Investigate the possibility of using API-based solutions to automate the management of your ads.txt file, including adding, removing, and updating entries. This can help streamline the maintenance process and reduce the risk of manual errors.
  • Implement Automated Validation: Set up automated checks to validate your ads.txt file for compliance, syntax errors, and other issues. This can help you catch problems early and ensure your file is always up-to-date.
  • Integrate with CMS and Ad Platforms: Look for ways to integrate your ads.txt management with your content management system (CMS) or ad platform. This can simplify the process of updating your file and ensure consistency across your digital properties.

Setupad encourages publishers to set up ads.txt redirect solutions available in our self-serve platform, to ensure any changes made to the ads.txt file will be automatically included in the redirected ads.txt file.

ads-txt-management

Conclusion 

We strongly suggest all publishers who want to monetize their website with ads incorporate ads.txt into their website operations to prevent potential ad revenue loss.

Besides, publishers don’t need a high degree of technical know-how to create the ads.txt file. Thanks to its accessible format, the ads.txt file can be created and updated in just a few minutes.

If you still have any questions about ads.txt and its implementation, email us at [email protected]

Frequently Asked Questions about Ads.txt

What is an ads.txt file?

An ads.txt file (Authorized Digital Sellers) is a text file created by publishers to list the companies authorized to sell their ad inventory. Introduced by the IAB Tech Lab in 2017, it helps prevent ad fraud, such as domain spoofing and unauthorized ad sales, by ensuring transparency and trust in programmatic advertising. Advertisers can use this file to verify legitimate sellers, protecting both parties in the digital advertising ecosystem.

What is an ads.txt validation test?

An ads.txt validation test checks the accuracy and proper implementation of an ads.txt file on your website. This test ensures the file is free of errors, formatted correctly, and accessible to ad buyers and crawlers. Proper validation helps maintain ad revenue and ensures authorized sellers are accurately represented, reducing the risk of ad fraud.

What is ads.txt status in Google AdSense?

The ads.txt status in Google AdSense indicates whether your ads.txt file is correctly implemented and accessible to Google’s crawlers. If your ads.txt file is missing or incorrectly configured, AdSense will display a warning, potentially affecting your ad revenue. Publishers should resolve these warnings promptly to ensure that only authorized sellers can sell their ad inventory through AdSense.

Where do I find my ads.txt file?

You can find your ads.txt file by visiting your website’s root domain and appending /ads.txt to the URL. For example, if your website is example.com, you can access your ads.txt file at https://example.com/ads.txt. This file must be publicly accessible to ensure ad buyers and platforms can verify its contents.

About Alise Zaiceva
Alise is a content marketing manager at Setupad. She’s passionate about content and helping publishers scale their businesses through powerful digital marketing strategies. In her free time, she expands her knowledge of tech.
message icon message icon big

message icon message icon big