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.

Ignite your online presence with cutting-edge Drupal VPS Hosting. Elevate speed, security, and reliability for a seamless website experience.

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):
    subdomain=subdomain.example.com
  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. example.com/ads.txt) 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 as well as additional information about Drupal site hosting.

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+