Guide · ads.txt

ads.txt explained: what it is and how to set it up

ads.txt is a simple text file that protects your ad revenue. Here's what to put in it, where it goes and how to avoid the most common mistakes.

By the Pub Premier team · Updated November 1, 2026

What is ads.txt?

ads.txt (Authorized Digital Sellers) is an IAB Tech Lab standard: a plain text file at the root of your domain that lists the companies authorized to sell your ad inventory. Buyers check it before they bid, to make sure they are buying genuine inventory from an authorized seller.

Why ads.txt matters for revenue

  • Buyers skip unauthorized inventory. Many demand platforms won't bid if the seller is not in your ads.txt.
  • It prevents domain spoofing, where fraudsters pretend to sell ads on your site.
  • It proves ownership. Pub Premier uses an ads.txt line to verify that you control your website.

The ads.txt line format

Each line has up to four comma-separated fields:

<ad system domain>, <your account ID>, <DIRECT | RESELLER>, <certification authority ID> # Example google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
FieldMeaning
Ad system domainThe domain of the advertising system (for example google.com).
Account IDYour seller or publisher account ID on that system.
RelationshipDIRECT if you (or your account) sell directly; RESELLER if a partner sells on your behalf.
Certification IDOptional ID of the ad system from the Trustworthy Accountability Group (TAG).

Lines starting with # are comments. Variables such as OWNERDOMAIN= and MANAGERDOMAIN= can describe who owns and manages the site.

Where to put the file

The file must be reachable at https://yourdomain.com/ads.txt — at the root of the domain, not in a folder — and must be served as plain text. One file covers the domain; subdomains can have their own.

Adding ads.txt on WordPress

  1. Use your hosting file manager or FTP to create ads.txt in the same folder as wp-config.php (usually public_html), or
  2. use an ads.txt plugin, which serves the file for you, and paste your lines into its settings.

Clear any page cache or CDN cache afterwards so the new file is visible.

Common mistakes

  • Wrong location — the file must be at the domain root.
  • HTML instead of text — a "page not found" page returned with status 200 is not an ads.txt file.
  • Typos in account IDs — copy lines exactly as your partners provide them.
  • Removing old lines by accident — add new partners' lines without deleting existing ones you still use.
  • Redirects to another domain — keep the file on the same domain.

How to check your ads.txt

Open https://yourdomain.com/ads.txt in a browser: you should see plain lines of text. Pub Premier publishers see their verification status in the dashboard, which re-checks the file automatically.

Put this into practice with Pub Premier.

Premium demand, header bidding and a transparent dashboard — free to join.