Posted on May 3, 2024

How Does Ads.txt Work and How to Create It?

6 reviews

Ad fraud is a burgeoning issue that affects the entire digital advertising value chain. According to recent stats, the cost of digital ad fraud is expected to reach from 88 billion to 172 billion U.S. dollars within the five years between 2023 and 2028.

To eliminate the occurrence of ad fraud and enhance accountability, the Interactive Advertising Bureau (IAB) initiated the Authorized Digital ad Sellers, protocol commonly called ads.txt format.

Ads.txt is a protocol that attempts to eliminate domain spoofing and ad space exploitations. In essence, this solution assists digital marketers in affirming vendors and, as a result, avoiding the purchase of fake inventories. 

Build Your Profitable Ad Exchange Business With Us!
Receive Free Custom Deployment Calculation

What is Ads.txt?

Ads.txt explained as a readily viewable database containing a compilation of ad tech partners (ad sellers) permitted to sell a publisher’s inventory. This database is contained in text format and is embedded in the publisher’s platform (website or app). The IAB initiated ads.txt to curb corrupt practices in internet advertising by confirming the legitimacy and authenticity of ad spaces.

For publishers, this tool enables them to have control over their inventory by indicating all legitimate vendors. Online marketers can avoid domain flipping scams and be sure of the quality of inventory they are paying for at all times.

Ads.txt format isn’t only for webmasters. There are also ads.txt for applications required for app publishing. What is app-ads.txt? This is a follow-up to the web ads.txt effort. With the app-ads.txt, developers can openly state which ad tech brands are allowed to sell their mobile inventory.

Based on the fresh stats, 50.5% of Google Play apps have implemented app-ads.txt. This means 1,623,838 out of all 3,215,517 apps have adopted the standard.

Whether for app or web, ads.txt generally serves the same purpose.

App-ads.txt Adoption Trends  Month-Over-Month Growth

How Does Ads.txt Work?

After clarifying the ads.txt definition, let’s find out how does ads.txt work. The ads.txt file is a compilation of ad vendors that a publisher collaborates with to sell advertorial spaces. It is often placed at the domain’s root directory and is easily accessible by marketers and ad buyers. It usually consists of four components, which include:

  • The AdTech brands with the legitimate right to sell ad spaces
  • Publisher’s identity code: A number that distinguishes your website or app on the seller’s AdTech platform
  • Nature of the partnership with the AdTech partner
  • Trustworthy Accountability Group certificate ID: This is optional
ads.txt example

Locating the ads.txt file is quite easy; simply add the extension “/ads.txt” to the publisher’s domain address. The advertiser can use an ads.txt checker to check this file to see if the ad exchange offering the publisher’s inventory is genuine and authorized to do so. An ad exchange may falsely list a popular publisher with good traffic and impression rate while, in reality, they don’t have any access to the publisher’s inventory. This is to deceive an unsuspecting advertiser who may want a premium inventory. In the end, the ad ends up in a different inventory with a poor impression.

By allowing publishers to specify which organizations are approved to sell their inventory, marketers can always verify the legitimacy of ad vendors they are dealing with. If a vendor selling a particular webmaster’s inventory doesn’t appear on the publisher’s ads.txt, the vendor is probably fraudulent.

Also, explore our article about the advertising in a cookieless world, considering over 90% of customers are bothered about their info that gets collected by advertisers, according to the study.

SmartHub's Features Have No Limits!
Get a Consultation For Free
Contact us

How Does Ads.txt Work for Apps?

Ads.txt for apps – is it possible? Let’s find out. In-app ads.txt operates and serves the same purpose as the web version but holds a few peculiarities. What occurs in an app ads.txt is this: mobile app developers build a list of AdTech partners who have permission to transact their ad inventory and host it on their site. Then, they provide a link that leads to their site in the app marketplace. Interested bidders can peruse the file via the developer’s website to confirm that their impressions are originating from approved sellers.

With this, online marketers may be certain that the app inventory they’re purchasing is genuine using this strategy.

How to Create Ads.txt?

Any editing program, such as Word Processors or WPS, can be used to produce ads txt files. It must include all the important information such as:

  • The adtech brand
  • Identification number
  • Nature of the partnership with the adtech company
  • The TAG (optional)

The first three pieces of information are critical for every entry, the last is optional, and the solution will function without them.

Ads.txt is straightforward and does not demand expert-level technical knowledge. Below is how to implement ads.txt for WordPress and AdSense.

Integrating on WordPress

Ads.txt has a specified program that you can install on a WordPress site. The plugin route is the most convenient approach to develop and include ads.txt in WordPress. All you need to do is download and enable the ads txt manager plugin.

After installing, launch the program and fill in the necessary information as stated above.

Let’s Review for Example How the Integrating on AdSense Happens.

Google does not mandate publishers to adopt the ads.txt protocol; however, they support and highly recommend its use. AdSense ads.txt users who do not use the ads.txt file often experience latencies and bug reports. On the use of Google ads.txt explains that the protocol is necessary for preventing ad fraud, especially regarding managing ad spaces. 

Ads.txt example files are available on the AdSense platform, and you can install them directly.

Here are steps to follow:

  • Go to your account
  • Tap on the menu tab
  • Initiate the “Create ads.txt file function
  • Complete download
  • Move the file to the root directory of your website
  • Fill the lines with the required data

You can use generators if you don’t want to create your ads.txt file manually. An ads.txt generator is a tool that automatically creates an ads.txt file. However, they still require you to input some information.

SmartHub's Features Have No Limits!
Get a Consultation For Free
Contact us

Examples of Ads.txt

Here are some popular sample ads.txt as published by the IAB.

Single direct, XF7342, DIRECT, 5jyxf8k54

The code above is an example of a site with only one approved system and managed by the webmaster.

Single reseller, 57013, RESELLER

The single reseller implies that only one partner is allowed and such an Adtech partner manages the process.

Multiple systems

# ads.txt file for, 12345, DIRECT, d75815a79, 9675, RESELLER, f496211, XF436, DIRECT, 45678, RESELLER, ABE679, RESELLER

The code above shows a website with multiple partners either direct or resellers.

How to Generate the Ads.txt File?

While various ad txt generators operate in somewhat different ways, the most common procedure is to enter your publisher ID and select the “generate ads.txt” option. This action generates an ads.txt file, which can be updated in a text editor and used wherever needed.

Validating Ads.txt

If an ads.txt is not appropriately created or there were mistakes while compiling the required information, it definitely won’t function. You have to test the file and ensure it is rightly done. You can do this by employing ads.txt validators- these are tools that check for errors in the ads.txt file. You use the validator by simply inputting the ads.txt URL into the validator. 

The Google Ad Manager has a pre-installed ads.txt validator, and if you have an Ad manager account, you may test your files directly. However, there are other independent validators that are accessible and easy to use. It is important to state that validators do not fix a badly created or non-functional ads.txt file. It is simply an ads txt tester that checks for errors.

How to Fix Ads.txt File Error?

Various errors may arise from your ads.txt file; it could be a syntax error, wrong ID, uploading the file to the wrong domain, etc. Often you may have to manually trace the issue and fix it because a validator or tester won’t fix it.

Below, we will look at some popular errors and how to address them.

Missing Ads.txt 

A missing ads.txt is the most typical problem many publishers face. Usually, if you have this error, it means the file wasn’t created correctly, or you have not uploaded it to your root domain.

You should ensure that the file is accurate and all the data points are correctly entered to rectify this issue. Read the section again if you’re unsure about creating the file correctly. After creating, ensure that it is uploaded to your root domain so that it is crawlable and buyers can easily access it.

Syntax Problem

The syntax error is another major issue most people face with ads.txt files. The IAB has set a standard for creating ads txt files, and not following this format would lead to an error-laden and invalid ads file.

To fix the syntax issue, you have to follow proper formatting standards. The protocol requires filling 3-4 data points, the first three are required, but the last is optional. Also, every field must be separated by a comma. it would look like this:

<Field #1>, <Field #2>, <Field #3>, <Field #4>

Incorrect Publisher ID

A publisher ID is a 16-digit number that is peculiar to every publisher and identifies them in an ad exchange. Advertisers and DSPs can easily identify every publisher and their specific inventory types with this unique number.

The ID is a mandatory requirement when creating the ads.txt file. The ads.txt file becomes invalid if it is missing or incorrectly entered.

Always double-check to ensure that your ID is correctly entered, but if you already experience the error, simply update your ads.txt with the accurate ID.

SmartHub's Features Have No Limits!
Book Your Free Consultation Spot
Request a Callback

Generating Adx.txt on SmartHub

With this ads txt guide, it won’t be difficult to add the file to your platform, and leading adtech platforms make it even easier by integrating an ads.txt generating tool. For instance, SmartHub has Auto Optimization Machine Learning Mechanisms, and Easy Platform Administration that includes Ads.txt generation. 

Go to Companies section

 Companies section on SmartHub

Go to the needed company and download ads.txt file

download ads.txt file on SmartHub

Send this ads.txt file to your SSP company POC, John Doe in our case.

Ask him to add your lines from ads.txt to his ads.txt hosted on his site, in our sample.

ads.txt file on SmartHub

This is what you can find inside ads.txt files generated by the platform. It consists of:

ads.txt file settings on SmartHub
  1. – the domain of SmartHub platform taken from sellers.json settings 
  2. c4ca4238a0b923820dcc509a6f75849b214 – reseller identifier
  3. seller type is always RESELLER because SmartHub is exchange platform
  4. b9678920dcc509a6f7Tag ID set up in Settings section

Learn more about what is sellers.json and why it is important for establishing an enhanced supply chain management, trust and brand safety.

Remember that top DSPs do not buy from publishers who do not have an ads.txt file as this is a standard for safety and good quality of traffic. Ensure that your file is regularly updated to reflect new partnerships. If you still have questions about generating ads.txt in SmartHub, keep in mind that you can always consult our helpful support team who will assist you when you need it. 

Looking For Detailed Case Studies?
Explore How Our Partners Have Grown With Us
Download For Free

Final Word

In this article, we reveled the maximum of useful information about what is ads.txt format, what is ads.txt management, how to generate the ads.txt file, and how to integrating on WordPress.

There are still a plenty of nuances to learn like ads.txt adoption, using of an ads.txt crawler, and others. If you are excited to deep in the programmatic industry and build your own white label ad exchange with SmartHub, reach us any moment.

Enjoyed the article?
Here you can rate it or share via your favourite social media!

5/5 (6 reviews)

You May Also Like

Want to Learn More?