Build a correct ads.txt or app-ads.txt file line by line, with one-click presets for common ad systems and their certification authority IDs. Or paste an existing file to validate every record and get a cleaned copy.
Last updated:
1. Seller lines
Ad system domainPublisher account IDRelationshipCert. authority ID
Bulk paste lines from your ad partners
2. Variables & options (optional)
ads.txt
Tip: open https://yourdomain.com/ads.txt in a new tab, select all and paste it here. Nothing is uploaded.
Cleaned & normalized copy
Advertisement
Advertisement
How to use the Ads.txt Generator
Choose the file type: ads.txt for websites or app-ads.txt for mobile and CTV apps.
Add seller lines: pick an ad system preset (it fills the domain and cert ID) and enter your publisher account ID, or paste the lines your ad partners gave you.
Set the relationship: DIRECT if you control the account, RESELLER if a partner sells your inventory through its own account.
Add variables such as CONTACT or OWNERDOMAIN if you need them, then review the warnings next to the output.
Download the file and upload it to the root of your domain so it loads at https://example.com/ads.txt.
Validate any existing file in the Validate tab to find typos and duplicate records.
Ads.txt record format
An ads.txt file is plain UTF-8 text. Every record sits on its own line and uses comma-separated fields. Anything after a # is a comment, and blank lines are ignored.
#
Field
Required
Example
Meaning
1
Ad system domain
Yes
google.com
Canonical domain of the exchange or SSP that sells the inventory
2
Publisher account ID
Yes
pub-1234567890123456
Your seller or account ID on that ad system, exactly as the partner gave it
3
Relationship
Yes
DIRECT
DIRECT if you control the account, RESELLER if a partner sells through its own account
4
Certification authority ID
No
f08c47fec0942fa0
The ad system's TAG ID, identifying the ad system rather than you
A complete line reads google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0. Buyers match the domain and account ID against the seller information in each bid request, so a single typo silently blocks that demand.
Variables
Variable
Use
CONTACT=
An email address, URL or phone number for the person who maintains the file.
SUBDOMAIN=
Points crawlers to a subdomain that has its own ads.txt file (website ads.txt only).
OWNERDOMAIN=
The business domain of the owner of the site (ads.txt 1.1), used to match sellers.json entries.
MANAGERDOMAIN=
The domain of a company that manages monetization for the site, optionally with a country code.
INVENTORYPARTNERDOMAIN=
Used in app-ads.txt and CTV setups to point to an inventory sharing partner's file.
Common ads.txt mistakes
Wrong Google ID format. Use pub- plus 16 digits. The ca-pub- form from the ad code does not belong in ads.txt.
Wrong location. The file must be at the root domain, for example https://example.com/ads.txt. A copy in a subfolder or on another host that you redirect to may be ignored.
Spaces instead of commas, or a fifth field. Each record has three or four fields separated by commas.
Copying partner lines blindly. Lines your partners send are normally RESELLER. List an account as DIRECT only if you own it.
Stale lines. Remove partners you no longer work with. An ads.txt full of old resellers makes your supply path look less clean to buyers.
Frequently asked questions
What is ads.txt?
Ads.txt (Authorized Digital Sellers) is an IAB Tech Lab standard. A publisher lists, in a plain text file at the root of its domain, every ad system and account allowed to sell its ad inventory. Buyers check the file to avoid buying spoofed or unauthorized inventory.
What is the format of an ads.txt line?
Each record has comma-separated fields: the ad system domain, your publisher account ID on that system, the relationship (DIRECT or RESELLER) and an optional certification authority ID, for example: google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0. Lines starting with # are comments.
Where do I upload ads.txt?
At the root of the domain, so it is reachable at https://yourdomain.com/ads.txt. It must be served as plain text with a 200 status. For apps, app-ads.txt goes at the root of the developer website listed in the app store.
What is the difference between DIRECT and RESELLER?
DIRECT means you (the publisher) control the account on that ad system. RESELLER means another company is authorized to resell your inventory using its own account on that system.
What is the certification authority ID?
The optional fourth field identifies the ad system in a certification authority, usually its TAG (Trustworthy Accountability Group) ID. For Google it is f08c47fec0942fa0. It must refer to the ad system, not to your own company.
How long until AdSense sees my ads.txt?
Google says crawling can take a few days, and for low-traffic sites longer. Make sure the file is at the root domain, includes your exact pub- ID and is not blocked by robots.txt or redirects to another domain.
Is my data uploaded?
No. The file is built and validated in your browser. Nothing you type is sent anywhere.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.