// BLOG

How to add ads.txt for higher CPMs

Learn what ads.txt is, why buyers check it, and how to create, upload and validate your ads.txt file on WordPress or any site to protect revenue and CPMs.

Published 2026-11-04 · BIDTORA

What ads.txt is

ads.txt (Authorized Digital Sellers) is a plain text file that a publisher places at the root of a website, for example example.com/ads.txt. It lists the companies that are authorised to sell that site's ad inventory. The standard was created by the IAB Tech Lab to fight domain spoofing, where fraudsters pretend to sell impressions on a well-known site they do not control.

Buyers and DSPs crawl ads.txt files and compare them with the seller information in each bid request. If a seller is not listed, many buyers will not bid at all. That is why a missing or incomplete ads.txt file can quietly reduce your revenue.

Why ads.txt can lead to higher CPMs

ads.txt does not raise prices by itself. What it does is make sure buyers are willing to bid on your inventory through every partner you use. When more authorised buyers compete for each impression, the clearing price tends to be healthier. Without a correct entry, a partner's demand may be filtered out by buyers, so you lose competition and revenue. Google AdSense also shows warnings in your account when ads.txt issues are detected.

The format of an ads.txt line

Each line has up to four comma-separated fields:

1. The advertising system's domain, for example google.com or bidtora.io.

2. Your publisher account ID in that system.

3. The relationship: DIRECT if you have the account yourself, RESELLER if a partner resells your inventory.

4. An optional certification authority ID (TAG-ID) for that system.

A typical AdSense line looks like: google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0 (use your own pub ID). Lines starting with # are comments. Your ad partners give you the exact lines to add; do not invent them. BIDTORA publishers get their lines in the dashboard, and our format is documented on the ads.txt page.

Step 1: Collect lines from every partner

Make a list of every network, exchange and SSP that sells your inventory, including any header bidding partners. Ask each for its ads.txt lines. Many partners provide a single block that includes their resellers. Keep this list in a document so you can update it when you add or remove partners.

Step 2: Create the file

Open a plain text editor (not a word processor) and paste the lines, one per line. Save the file as ads.txt in UTF-8 encoding. Optionally add contact=you@yourdomain.com and, if you use an ad management platform, its managerdomain or ownerdomain variable, as defined in the latest IAB specification.

Step 3: Upload it to the root of your domain

The file must be reachable at https://yourdomain.com/ads.txt, not in a subfolder. On a standard host, upload it with your file manager or FTP into the public web root (often public_html). On WordPress, you can use a dedicated ads.txt plugin or upload the file directly; avoid having both, since a plugin may serve a different version. On frameworks like Next.js, place it in the public folder. If you use www and non-www versions of the site, both should redirect to one canonical host and the file should load there.

Step 4: Validate

Open yourdomain.com/ads.txt in a browser and check that it returns the text with a 200 status code and a text/plain content type, without redirects to a login page or HTML error page. Use your ad partners' dashboards or a public ads.txt validator to catch formatting mistakes. Crawlers can take a few days to pick up changes.

Common mistakes

1. Typos in the publisher ID or using another site's ID.

2. Marking a resold relationship as DIRECT.

3. Leaving old partners in the file indefinitely. Keep it accurate, not just long.

4. Blocking /ads.txt in a firewall, security plugin or CDN rule.

5. Forgetting app-ads.txt if you also monetise mobile apps.

sellers.json: the other half

ads.txt lets you say who may sell your inventory. sellers.json, published by each exchange and SSP, lets that company say who its sellers are. Buyers cross-check both. BIDTORA publishes a sellers.json generated from real account data, which is part of why buyers can trust the supply.

How often to update ads.txt

Treat ads.txt as a living file. Update it the same day you add or remove an ad partner, and review it at least once a quarter even if nothing has changed, because partners sometimes change their reseller lists or certification IDs. When a partner sends you an updated block, replace the old lines rather than appending duplicates. Duplicate or conflicting lines are not usually fatal, but they make the file harder to audit and easier to get wrong.

If several people manage your site, decide who owns the file. On WordPress it is common for a theme update, a security plugin or a migration to overwrite or remove ads.txt without anyone noticing, so add a simple monthly check to your routine: open the file in a browser, confirm every active partner is listed, and confirm it still returns a 200 status. A few minutes of maintenance protects revenue that would otherwise disappear silently, because buyers do not tell you when they stop bidding.

Next steps

Once ads.txt is in place, review your partner mix. Adding an additional bidder can increase competition for each impression; see our guide to ad networks for publishers in Pakistan or the publisher integration docs. If you have 50k+ monthly visits, you can apply for BIDTORA early access.

Ready to plug in?

Accounts are reviewed manually during early access.