Skip to content

📜 ads.txt Generator

Build an IAB-compliant ads.txt with one-click presets for Google AdSense, Ad Manager, Amazon, Index Exchange, Rubicon, OpenX, PubMatic, Sovrn, Criteo and more. DIRECT / RESELLER supported.

100% Free No signup Browser-only 5 languages Dark mode

🔒 About Privacy

🏷️ Publisher ID

🌐 Networks

➕ Custom rows

Format: domain, publisher-id, DIRECT|RESELLER, [TAG-ID]

📄 ads.txt


    

Place this file at the domain root (https://example.com/ads.txt).

📚 About ads.txt

ads.txt (Authorized Digital Sellers) is an anti-ad fraud standard established by IAB Tech Lab. It publicly lists authorized vendors with permission to sell ad inventory in a text file, preventing domain spoofing. When using Google AdSense or Ad Manager, implementation is essentially mandatory.

📖 Where people get stuck

Starting from your publisher IDs and a choice of ad networks, this builds an ads.txt in the four-column form domain, publisher-id, DIRECT|RESELLER, TAG-ID. Everything runs in the browser and no ID is sent to a server. All this tool can guarantee is the syntaxit cannot verify that an ID is correct or that you really have a relationship with that network. And since ads.txt is a file that declares "do not buy inventory from any seller not listed here", a perfectly formatted file with one character wrong in an ID silently kills every bid coming through that seller.

Case What happens What to do
In the wrong location it counts as absent Crawlers look only at the root of the domain, that is https://example.com/ads.txt. They will not fetch /blog/ads.txt or /ads.txt.html. Three failures are common. The first is an SPA or static host that returns index.html with a 200 for unknown paths: the crawler receives HTML, finds none of your ad system lines in it, and reads that as everything unauthorized. The second is subdomains — inventory on blog.example.com is checked against blog.example.com/ads.txt, and the file at the root does not apply automatically. The third is redirects, which the specification only follows a limited number of times. Opening it in a browser is not enough. Run curl -I https://example.com/ads.txt and check three things: the status is 200, the Content-Type is text/plain, and there is no redirect. If you get text/html back, what you are looking at is your application fallback page, not an ads.txt. If you serve ads from a subdomain, add a subdomain=blog.example.com line to the root file or place a real file on that subdomain as well. With and without www are also different hosts, so run curl against both.
Writing DIRECT or RESELLER against the actual relationship DIRECT means you hold a contract directly with that ad system and are paid directly by it. If you monetize AdSense through MCM or an intermediary partner, the correct line is the one that partner specifies, and it usually includes a RESELLER entry. There is no advantage in writing DIRECT — buyers cross-check the file against sellers.json, so a claim that contradicts reality costs you credibility instead. The other classic mistake is the domain column: it takes the canonical domain of the ad system (google.com), not the URL of its dashboard (adsense.google.com). Do not compose the lines yourself: copy the exact string each partner publishes in its dashboard. Every major ad network documents the line to add to your ads.txt. Check the publisher ID character by character against what your payment account shows, and for Google match it exactly including the pub- prefix. The fourth column, TAG-ID, is optional, but include it when you can — some buyer-side filters give it weight. Finally, have Google Ad Manager or AdSense read the finished file on its ads.txt status screen and confirm the warning clears. That screen is the final authority on whether the syntax is accepted.
Regenerating the file drops lines that used to be there A change to ads.txt does not take effect immediately, and cannot be undone immediately either. Crawlers cache what they fetched for roughly a day, so adding a new network will not start serving the same day. The dangerous direction is the reverse: publish a file that omits a line you previously had and the demand through that seller stops within about a day. If your process is to regenerate from scratch and overwrite, you will eventually forget a partner line added months ago and drop it. And because falling revenue on its own does not tell you the cause, it can take a long time to notice. Never upload the generated file directly — always diff it against the file that is live right now. Pull the real one with curl -s https://example.com/ads.txt > live.txt and run diff live.txt new.txt to see whether the lines that disappear are only the ones you intended. Operationally, the reliable answer is to keep ads.txt in Git and route every change through review. It also helps to be able to see daily ad revenue broken down by partner, so you can isolate the cause when something breaks. Recording the date a line was added as a comment (# at the start of a line) lets whoever comes after you judge whether a line is safe to remove.

ads.txt is a public file, and that is by design. Anyone can fetch it, so which networks you work with is plainly visible to your competitors. There is no way around this and no mechanism to hide it — keeping your ad stack secret is fundamentally incompatible with ads.txt. Its scope is also widely misunderstood, so to be precise: this file covers web ad slots only. App inventory uses a separate file, app-ads.txt, and it belongs at the developer website URL listed in your app store entry, not on the app domain. Video has its own mechanisms such as ads.cert. And finally — ads.txt is a declaration meant to stop spoofed inventory from being bought, not a setting that increases revenue. Publishing it does not raise your CPM; rather, not publishing it makes buyers avoid you.

📖 How to Use

  1. 1
    Enter publisher IDs
    Enter your Google AdSense / Amazon publisher ID.
  2. 2
    Pick networks
    Check the SSPs and ad networks you use.
  3. 3
    Deploy
    Place the file at https://example.com/ads.txt.

❓ Frequently Asked Questions

What is the difference between DIRECT and RESELLER?
DIRECT means the publisher contracts the network directly. RESELLER means via an intermediary. Use DIRECT for direct deals.
Is TAG-ID required?
IAB Tech Lab certification ID. Optional but recommended. Empty is still valid.
How long until ads.txt takes effect?
Google usually crawls within 24 hours, up to a week. Verify in Ads Center.
🐛 Found a bug or issue with this tool?

Free to use, no signup. Even just the steps to reproduce are helpful. Reports go directly to the operator and help us fix issues.

* Browser info (UA / screen / language / URL) is sent automatically to help reproduce the issue