Ads.txt Generator for AdSense
Paste your AdSense Publisher ID and get a ready-to-use ads.txt file — correctly formatted, validated, and downloadable with the right file name.
What Is an Ads.txt File?
Ads.txt stands for Authorized Digital Sellers. It is a standard created by the IAB Tech Lab — the body that sets online advertising standards — and it is nothing more than a small plain-text file sitting on your website that publicly declares: these companies, and only these companies, are allowed to sell advertising space on my site.
Why does that matter? Without the file, a scammer can pretend to sell "your" ad space to advertisers (domain spoofing), and buyers have no way to check. With it, ad buyers look at your ads.txt before paying — and Google uses it to confirm that the ads on your site belong to a real, authorized AdSense account. If AdSense shows you an "ads.txt" warning or a "Not found" status, this one-line file is the usual fix.
For most bloggers, the whole file is a single line:
google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, f08c47fec0942fa0
What Each Part of the Line Means
| Field | Value | Meaning |
|---|---|---|
| Ad system domain | google.com | The company selling the ads — always google.com for AdSense. |
| Publisher ID | pub- + 16 digits | Your account inside that system. This is the only part that is yours. |
| Relationship | DIRECT or RESELLER | DIRECT = you control the account yourself. RESELLER = someone else manages the inventory for you. |
| Certification (TAG) ID | f08c47fec0942fa0 | Google's fixed ID from the Trustworthy Accountability Group. Identical for every AdSense publisher — never change it. |
Where Do I Find My Publisher ID?
In AdSense: Account → Settings → Account information — it is shown as pub- followed by 16 digits. The same number appears inside your ad code with a ca- in front (ca-pub-…); in an ads.txt line the ca- is dropped. This tool accepts all three forms — pub-…, ca-pub-…, or the bare digits — and writes the correct one. And a reassurance: your Publisher ID is public information, not a password. It sits in your site's public page source anyway. Never share your AdSense login — the ID itself is safe.
How to Use This Tool (Step by Step)
- Paste your Publisher ID — one per line if you genuinely run more than one account.
- Leave the relationship on DIRECT unless an account manager runs AdSense for you (then choose RESELLER).
- Generate. The tool validates every ID — exactly 16 digits — and refuses to write broken lines: a mistyped ID in a live ads.txt file is worse than no line, because AdSense keeps flagging the file as wrong.
- Copy or download. The download is named
ads.txtautomatically, because the file name is not optional — it must be exactly that. - Put it on your site (next section), then open
yourdomain.com/ads.txtin a browser to confirm your line is live.
How to Add Ads.txt to Your Site
On Blogger (no file upload needed): Blogger dashboard → Settings → scroll to Monetization → turn on Enable custom ads.txt → paste your generated line → Save. Blogger then serves it at yourdomain.com/ads.txt automatically.
On WordPress or your own hosting: upload the downloaded ads.txt file to your domain's root folder (the same level as your homepage, next to robots.txt) using your host's file manager or FTP — or use an ads.txt manager plugin and paste the line there instead.
Then verify: visit https://yourdomain.com/ads.txt. You should see exactly your line. AdSense usually detects the file within a day or two, though the warning in your dashboard can take longer to clear — a correct live file plus patience beats re-uploading it daily.
Common Mistakes That Keep the Warning Alive
| Mistake | Why it fails |
|---|---|
| Wrong or mistyped Publisher ID | The line must match your account exactly, 16 digits. One wrong digit = file "found, but wrong". |
| Keeping the ca- prefix in the line | Ad code uses ca-pub-; ads.txt lines use plain pub-. Mixing them is a classic silent error. |
| File in a subfolder or under www only | Crawlers look at the root domain: yourdomain.com/ads.txt. A file at /blog/ads.txt does not count. |
| Someone else's Publisher ID | Never paste an ID from a tutorial or another site — the file declares who may sell your space, and a foreign ID authorizes them, not you. |
| Expecting an instant all-clear | Detection takes time. Verify the file is live and correct, then wait rather than editing repeatedly. |
Selling ads in a mobile app instead? The app equivalent is called app-ads.txt and goes on your developer website — the line format is the same.
Frequently Asked Questions
Is ads.txt mandatory for AdSense?
Not strictly mandatory, but strongly recommended by Google. Without it, you can see "ads.txt not found" warnings, and in cases of spoofing your inventory may simply not be bought. It takes two minutes — there is no good reason to skip it.
Can I add more than one Publisher ID?
Yes. If you run multiple AdSense accounts on the same site (rare for bloggers, more common with account managers), put each ID on its own line — this tool generates one line per ID, duplicates removed.
DIRECT or RESELLER — which am I?
If the AdSense account is yours and you log in and manage it yourself, you are DIRECT. RESELLER is for arrangements where another party's account sells your inventory — for example some "AdSense partner" or account-management services. If nobody manages ads for you, DIRECT is correct.
Why does the tool reject my ID?
Because it is not exactly 16 digits after the prefix. Check for a missing or extra digit, or a letter that slipped in while copying. The check exists because a malformed line published live does real harm — it keeps your file in an error state.
I published the file but AdSense still shows the warning. What now?
First open yourdomain.com/ads.txt yourself and compare the ID digit by digit with AdSense → Account information. If the live file is correct, wait — detection typically lands within 24–48 hours and the dashboard warning can lag beyond that.
Do I need an approved AdSense account to create the file?
You need your Publisher ID, which exists once your AdSense account is created. Many publishers prepare the file during setup and add it as soon as their site is approved, so the warning never appears.
Is this tool free, and is my ID uploaded?
Free, no sign-up — and no, generation runs in your browser; your ID is never sent or stored. (It is a public identifier anyway, but there is no reason for it to travel.)
Last updated: November 2026. More free tools from TodayCreators: the Bulk Roll Number Generator, the Line Filter Tool, and the Bulk URL Opener.
Thanks for reading! ads.txt generator you can check out on google.
