Practical guide to setting up your ads.txt file

The ads.txt file allows a website owner to declare which advertising systems are authorized to sell advertising inventory on the site. If ads.txt is marked as required for a domain in the |related| interface, the current lines assigned to that domain must be available in its ads.txt file.

Where can you find the current file?

  1. Sign in to the |related| publisher interface.
  2. Select ads.txt on the right side of the top navigation.
  3. Find the domain you want to update and click Download ads.txt.

Always download the file from the row of the relevant domain. In addition to the central lines, some websites may have domain-specific lines, so files belonging to different domains are not necessarily identical.

Initial setup

If the domain does not have an ads.txt file yet, upload the downloaded file to the root directory of the website as ads.txt. It must be publicly accessible without signing in, for example at https://example.com/ads.txt.

What should you do when an update is required?

When you receive a notification about an ads.txt change, download the current file for each affected domain again.

  • If the existing ads.txt file contains only |related| lines, replace the entire file with the newly downloaded version.
  • If it also contains lines for other partners, keep those lines and replace only the previous Related block between the #related-v...-start and #related-v...-end markers with the full contents of the downloaded file.

Do not append the new Related block next to the old one. Always replace the previous block so that outdated or duplicate lines do not remain in the file. Do not upload a file generated for another domain, and do not modify or remove lines from the new Related block.

How can you verify the setup?

After uploading the file, return to the ads.txt page in the publisher interface and run the check for the domain. Possible statuses are:

  • Valid: every required line is present.
  • Incomplete: the file is accessible, but one or more required lines are missing.
  • Cannot be checked: the file or website cannot be reached for a technical reason.
  • Pending check: the current check has not been completed yet.

When the status is incomplete, the Missing lines button displays the lines that must be added and lets you copy them.

Common issues

  • The file was not uploaded to the root directory of the website.
  • The filename is not exactly ads.txt, or it became ads.txt.txt.
  • The file belongs to another domain.
  • A website or CDN cache is still serving the previous version.
  • The file requires authentication, or the hosting provider, firewall, or CDN bot protection blocks RelatedBot requests.
  • Some required lines were modified or omitted.

If the ads.txt file opens in a browser but the status is still Cannot be checked, the hosting provider, firewall, or CDN bot protection is probably blocking RelatedBot requests. Follow the steps in the RelatedBot guide to allow the bot, then run the check again.

If caching is enabled, clear the website and CDN cache, then run another check after a few minutes. If you cannot upload the file yourself, ask your hosting provider or website administrator for assistance.




back to the knowledge base main page