UTILS.
100% in-browser
📄

ads.txt / app-ads.txt Generator

Generate a valid ads.txt or app-ads.txt: validates each record, dedupes, and adds CONTACT and SUBDOMAIN directives. Runs in your browser.

— output appears here —

About this tool

ads.txt (and its app-ads.txt sibling) lets publishers declare which ad systems are authorised to sell their inventory. This tool builds a clean, valid file from your records, all in your browser with no upload.

Each line is "adSystemDomain, publisherID, relationship, [certAuthorityID]". The tool validates every row — the domain must look like a real domain, the publisher ID must be present, and the relationship must be DIRECT or RESELLER (case-insensitive) — then normalises the relationship to upper-case, removes exact duplicates, and passes comment lines (starting with #) through untouched. Rows that fail validation are counted and skipped rather than emitted.

Optional CONTACT= and SUBDOMAIN= directives can be added and accept several values separated by commas or new lines. A summary shows how many records were kept, deduped and skipped. Copy or download the result and host it at https://yoursite.com/ads.txt.

Frequently asked questions

What does each field mean?
Domain is the ad system (e.g. google.com), publisher ID is your seller account ID, relationship is DIRECT or RESELLER, and the optional fourth field is the certification authority ID (TAG ID).
What makes a row invalid?
A missing or malformed domain, a missing publisher ID, or a relationship that is not DIRECT or RESELLER. Invalid rows are skipped and counted, never written to the output.
Are duplicates removed?
Yes. Identical records (same domain, publisher ID, relationship and cert ID, ignoring case) are collapsed to a single line and counted as duplicates.
Where does the file go?
Host ads.txt at the root of your web domain, or app-ads.txt at the root of your app developer domain, so ad exchanges can verify authorised sellers.

More tools