How to Create an Ads.Txt File in Drupal

The Ads.txt file, which stands for Authorized Digital Sellers, is a countermeasure against fraud within programmatic advertising. This initiative, governed by the Interactive Advertising Bureau (IAB), allows two important things: 

  • Anyone can see which companies are authorized to sell ad inventory for a specific website
  • Advertisers can ensure ad space purchases for a website aren’t counterfeit

Although it’s not commonly discussed, the standard is backed by major tech companies including Google and has been around since 2017.

Get the power and performance you need without additional configurations with our Drupal VPS Hosting.

What is the Ads.Txt File

Technically speaking, the Ads.txt file is a text file with one authorized advertiser per line. The format consists of four fields, separated by commas, using the OpenRTB (real-time bidding) protocol:

  • Domain name of the authorized company such as supply-side platforms (SSPs) and exchanges
  • Publisher account ID of the authorized company used for OpenRTB bid requests
  • Relationship with the authorized company (direct or reseller)
  • Certification authority ID with TAG (optional) 

Below we’ll cover how to do this with the AdsTxt Drupal module.

Not what you were expecting? If you’re interested in commissions, check out our InMotion Hosting affiliate program.

Install the AdsTxt Drupal Module

This is the easiest way to install the Drupal AdsTxt module.

  1. Log into Drupal.
  2. Install the Drupal module using the AdsTxt download link for your Drupal version.
  3. Click Enable newly added modules.
  4. Under Advertising, select ads.txt.
  5. At the bottom, select Install.

Configure Your Drupal Ads.txt File

Drupal Ads.txt confguration
  1. On the Configuration page, select Ads.txt.
  2. Replace the examples with authorized companies in your ads.txt and app-ad.txt (for mobile apps) files. 
  3. If a subdomain of your Drupal site has a separate list of authorized companies, add the following (replacing the text below with your full subdomain):
  4. You can also add a contact method (email address or contact page). Anything after code#/code will be ignored:
    [email protected]
  5. Once you’re done, select Save Configuration.
  6. Check your results (e.g. to ensure it’s not blocked by robots.txt or a redirect misconfiguration resulting in a 404 error.

Learn more from our Drupal Education Channel.

Jacqueem Content Writer I

Technical writer focused on cybersecurity and musicianship.

More Articles by Jacqueem


It looks like this article doesn't have any comments yet - you can be the first. If you have any comments or questions, start the conversation!

Was this article helpful? Let us know!