Manage your ads.txt and app-ads.txt files from the Drupal admin UI — no
server access, no deployments, and a separate file for every site in a
multisite install.
ads.txt (Authorized Digital Sellers) is the IAB Tech Lab standard that lets
publishers declare who is allowed to sell their ad inventory. Ad networks
such as Google AdSense check it before buying. Without a valid file, your
programmatic ad revenue can suffer.
WHY USE THIS MODULE
Normally ads.txt is a static file in your docroot. That is a problem if you
run Drupal multisite, because every site shares one docroot and therefore
one file. It is also awkward if your marketing team needs to update the file
but does not have server access or a deploy pipeline.
This module serves both files dynamically from Drupal, so each site gets its
own content, editable in the browser.
FEATURES
- Edit ads.txt and app-ads.txt from the admin UI
- Per-site files in a multisite install
- Served at /ads.txt and /app-ads.txt with the correct text/plain header
- Fully cached, and cleared automatically when you save
- Imports any existing ads.txt file when you install the module
- Lets other modules add lines programmatically
- -No server
or filesystem access needed
REQUIREMENTS
Drupal 10.2, 11 or 12. No dependencies.
INSTALLATION
composer require drupal/adstxt
Then enable the module as usual.
CONFIGURATION
Go to Administration > Configuration > System > Ads.txt
(/admin/config/system/adstxt) and paste in your content. You need the
"Administer ads.txt" permission.
If a physical ads.txt file exists in your docroot, remove it — the web
server will serve that instead of Drupal. The status report will warn you.
FOR DEVELOPERS
Other modules can append lines and declare their own cache tags using
hook_adstxt() and hook_app_adstxt(). See adstxt.api.php.
MORE INFORMATION
- About ads.txt: https://iabtechlab.com/ads-txt/
- app-ads.txt for mobile and CTV apps: https://iabtechlab.com/ads-txt/
Project information
- Ecosystem: Advertisement
799 sites report using this module
- Created by marcelovani on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 8.x-1.x-dev updated 25 Aug 2026 at 10:07 UTC


