Free Ads.txt Generator for AdSense
Generate a perfectly formatted Authorized Digital Sellers (ads.txt) file to prevent ad revenue loss.
How the Ads.txt Generator Works
Dealing with the dreaded "Earnings at risk" warning in your dashboard can be stressful. That is exactly why we built this free Ads.txt Generator tool. Our tool takes your unique 16-digit Publisher ID and instantly formats it into the exact code string that Google and the Interactive Advertising Bureau (IAB) require.
By using this Ads.txt Generator, you remove the guesswork. You don't have to worry about missing commas, incorrect capitalization, or typos that might block your revenue. Simply paste your ID, and the tool builds a valid code ready to be pasted directly into Blogger or uploaded to your website's root directory. Once updated, it signals to advertisers that your domain is fully authorized to display their ads.
Key Features
- Instant Formatting: Automatically formats your Publisher ID into the standardized IAB-approved layout without any manual typing.
- Input Cleaning: Intelligently strips out unnecessary prefixes like "ca-pub-" or "pub-" if you accidentally paste them, preventing syntax errors.
- One-Click Copy: Instantly copy the generated string to your clipboard for quick pasting into your Blogger settings.
- File Download: Easily download a ready-to-upload
.txtfile if you are using a self-hosted platform like WordPress or custom HTML. - Browser-Based: Everything happens locally on your device for maximum speed and privacy.
How to Use
- Log into your AdSense dashboard and navigate to Account, then Settings, and select Account information to find your Publisher ID.
- Copy the 16-digit number (it usually looks like pub-1234567890123456).
- Paste that ID into the Publisher ID input field in the Ads.txt Generator above.
- Select your Account Type (choose DIRECT if you own the site and account).
- Click the Generate Ads.txt Code button.
- Click Copy to Clipboard to paste it into Blogger, or Download .txt File to upload it to your web host.
One Worked Example
Let’s say you just launched a new blog, checked your Website AdSense Eligibility, got approved, and received Publisher ID: pub-9876543210987654. You own the site directly.
Your Input:
- Publisher ID:
9876543210987654 - Account Type:
DIRECT
The Tool Output:
This exact string verifies that Google (google.com) is allowed to sell ads on your behalf, using your specific publisher account, directly from you, verified by Google’s official certification ID (f08c47fec0942fa0).
Who Should Use This Tool
- Blogger Platform Users: Anyone hosting a site on Blogspot who needs to fill out the "Custom ads.txt" field in their monetization settings.
- New Publishers: Users who just got their accounts approved and are seeing the red "Earnings at risk" banner for the first time.
- WordPress Site Owners: Webmasters who prefer downloading a clean .txt file to upload directly to their domain's root folder.
- Domain Migrators: People moving their established blogs to new domain names who need to quickly recreate their monetization files to maintain their AdSense revenue.
Basic Knowledge
Ads.txt stands for Authorized Digital Sellers. It is a simple text file created by the Interactive Advertising Bureau (IAB) Tech Lab to combat ad fraud. In the early days of digital advertising, malicious actors would create fake websites, pretend to be premium publishers, and trick advertisers into buying fake traffic.
To solve this, the ads.txt file was introduced as a public ID card for websites. When you place this file on your domain, it publicly declares exactly which companies and publisher accounts are legally permitted to sell your ad space. Before advertisers place a bid to show an ad on your site, their automated software checks your domain to see if this file exists and matches your account details. If it doesn't match, they won't bid, meaning you lose money. Alongside having a proper custom robots.txt file for SEO crawling, having a valid ads.txt is the most crucial technical step for a monetized blog.
Tips and Common Mistakes
- Avoid Double Prefixes: Do not format your code as
pub-pub-1234...orca-pub-pub-1234.... Our Ads.txt Generator automatically cleans your input to prevent this mistake. - Root Placement: If you are not using Blogger, ensure the downloaded file is uploaded exactly to your root directory (e.g.,
yoursite.com/ads.txt). If it is placed in a subfolder, crawlers will not find it. - Be Patient: Google’s bots do not crawl your ads.txt file every day. After you add it, it can take anywhere from a few days to a few weeks for the error warning to clear from your dashboard.
Privacy and Safety
- Runs Locally: This Ads.txt Generator tool is powered entirely by JavaScript running in your own web browser.
- No Data Collection: We do not send your Publisher ID to any external servers, databases, or third-party APIs.
- No Registration Required: You can use the tool completely free of charge without creating an account or logging in.
- Secure Output: The text file you download is generated securely on your own device.
Frequently Asked Questions
How long does the earnings at risk warning take to disappear?
Once you paste the generated code into your site, it typically takes Google's crawlers between 24 hours and a few weeks to detect the change. As long as the code is accurate, the warning will disappear automatically.
Is DIRECT or RESELLER correct for me?
If you own the website and you created the advertising account yourself, you should select DIRECT. RESELLER is only used if you have partnered with a third-party ad network that manages and sells your ad inventory for you.
Can I use this for multiple ad networks?
Yes. A single ads.txt file can contain multiple lines of code. If you use other networks alongside Google, you simply generate the string for each network and paste them all on separate lines within the same file.
Where do I put this in Blogger?
Go to your Blogger dashboard, click on Settings, and scroll down to the Monetization section. Toggle "Enable custom ads.txt", click on the text below it, and paste the copied code from this tool.
What happens if I don't add the file?
While your ads may continue to show temporarily, many premium advertisers will eventually refuse to bid on your inventory. Over time, this will significantly decrease your cost-per-click (CPC) and overall revenue.
Disclaimer: The results provided by this tool are based on standard formatting rules. This tool is for informational purposes; always verify your account status and policy updates directly via official Google documentation.