Protect Your Ad Revenue: The Ultimate Ads.txt Generator & Validator
In the multi-billion dollar digital advertising ecosystem, ad fraud and domain spoofing are constant threats. Malicious actors try to sell fake ad inventory under your brand's name, stealing your hard-earned revenue and damaging your reputation with advertisers. To combat this, the IAB (Interactive Advertising Bureau) Tech Lab introduced the Authorized Digital Sellers (ads.txt) protocol. Today, having an ads.txt file is no longer optional—it is a strict requirement by Google AdSense, Google Ad Manager, Mediavine, Ezoic, and all major ad exchanges.
If you have ever seen the dreaded "Earnings at risk - You need to fix some ads.txt file issues to avoid severe impact to your revenue" warning in your AdSense dashboard, you know how stressful it can be. The Tools of Everything Ads.txt Generator is designed to eliminate this headache. Whether you are monetizing a new blog or managing a portfolio of high-traffic enterprise websites, our tool ensures your ads.txt file is formatted with 100% precision, keeping your revenue streams secure and your ad fill rates maximized.
What Exactly is an Ads.txt File?
Ads.txt is a simple, publicly accessible text file placed in the root directory of your website (e.g., yourdomain.com/ads.txt). It acts as a transparent public record that declares exactly who is authorized to sell your digital ad inventory. When a brand wants to buy ad space on your site, their programmatic buying platform automatically checks this file.
If the seller (like Google or Ezoic) is not listed in your ads.txt file, the advertiser will not bid, and the ad space will remain blank. By implementing this file, you create a secure supply chain. It tells the world: "Only the ad networks listed here have my permission to sell ads on my website."
Understanding the Ads.txt Syntax (The 4 Key Fields)
A valid ads.txt file consists of one or more lines of text, with each line containing up to four comma-separated values. Let us break down a standard Google AdSense line: google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0
1. Domain of the Ad System (Required)
The canonical domain name of the advertising system you are authorizing. For AdSense and Google Ad Manager, this is always google.com. For others, it might be rubiconproject.com or appnexus.com.
2. Publisher Account ID (Required)
Your unique account identifier associated with the ad system. For Google, this is your 16-digit publisher ID, prefixed with "pub-" (e.g., pub-0000000000000000). This must match exactly.
3. Relationship Type (Required)
Declares your relationship with the ad network. Use DIRECT if you directly control the account (like your own AdSense). Use RESELLER if a third-party agency (like Ezoic) is managing and selling inventory on your behalf.
4. Certification Authority ID (Optional)
An ID that uniquely identifies the advertising system within a certification authority (like the Trustworthy Accountability Group - TAG). For Google, this static value is always f08c47fec0942fa0.
How to Find Your Google AdSense Publisher ID
To use our generator, you will need your unique Publisher ID (Pub-ID). It is very easy to find within your Google AdSense dashboard. Follow these steps:
- Sign in to your Google AdSense account.
- In the left navigation menu, click on Account.
- Click on Settings, and then select Account information.
- Look for the field labeled Publisher ID. It will look like
pub-1234567890123456. - Copy the entire string (including the "pub-" prefix) and paste it into our generator above.
How to Upload Ads.txt to Your Website
Once you have generated and downloaded your ads.txt file using our tool, the next crucial step is placing it in the correct location on your web server. It must be placed in the root directory. If a buyer goes to yourwebsite.com/ads.txt, they must be able to see the text file. Here is how to do it on popular platforms:
For WordPress Users
The easiest way is using a plugin. Install and activate a free plugin like "Ads.txt Manager". Go to Settings > Ads.txt, paste the text generated by our tool into the text box, and save changes. Alternatively, you can use an FTP client (like FileZilla) or your hosting's File Manager to upload the file directly into the public_html folder.
For cPanel / Custom Hosting
Log in to your cPanel dashboard and open the File Manager. Navigate to the public_html directory (or the root directory of your specific domain). Click "Upload" and select the ads.txt file you downloaded from our tool. Ensure the file permissions are set to readable (usually 644).
For Shopify Users
Shopify does not allow direct access to the root directory for file uploads. However, you can manage this by going to Settings > Files. Upload your ads.txt file there. Then, go to Online Store > Navigation > URL Redirects. Create a URL redirect from /ads.txt to the URL of the file you just uploaded.
For Blogger (Blogspot) Users
Go to your Blogger dashboard. Navigate to Settings. Scroll down to the "Monetization" section. Enable "Enable custom ads.txt". Click on "Custom ads.txt" and paste the code generated by our tool. Click Save.
Common Ads.txt Errors and How to Fix Them
Even a small typo can cause AdSense to pause your ad serving. Here are the most common issues publishers face and how to resolve them:
-
❌
Missing "pub-" Prefix: Google strictly requires the Publisher ID to include the "pub-" prefix (e.g.,
pub-1234567890). If you only put the numbers, the file is invalid. -
❌
Typographical Errors in Domain: Ensure the domain is exactly
google.com. Do not write "www.google.com" or "google.com/". -
❌
File is Not in the Root Directory: If you placed the file in
yourdomain.com/wp-content/ads.txt, ad crawlers will not find it. It must be strictly atyourdomain.com/ads.txt. -
❌
Server Returning a 404 or HTML Page: Sometimes, security plugins or misconfigured redirects cause the server to return an HTML webpage instead of a raw text file when visiting the ads.txt URL. Ensure the file is served with a
Content-Type: text/plainHTTP header.
Frequently Asked Questions (FAQ)
How long does it take for Google AdSense to detect my ads.txt file?
Once you upload the file to your root directory, it can take anywhere from 24 hours to a few days for Google's crawlers to verify it. You do not need to submit anything manually; Google checks this automatically. Once verified, the warning in your AdSense dashboard will disappear.
Can I add multiple ad networks to one ads.txt file?
Yes, absolutely. If you work with multiple ad networks (e.g., AdSense, Taboola, and Index Exchange), you must include all of them in the same ads.txt file. Just place each network's authorization on a new line. Never create multiple ads.txt files.
Do I need an ads.txt file for subdomains?
Ad networks crawl the root domain first. If you have blog.yourdomain.com, the crawler will check yourdomain.com/ads.txt. Unless you specify otherwise using a "subdomain=" declaration in your root file, the root ads.txt covers subdomains automatically.
What happens if I just delete the ads.txt file?
If you delete the file, ad networks will eventually assume you have not authorized anyone to sell your inventory. While some legacy systems might still serve ads temporarily, modern programmatic buyers will strictly stop bidding on your site, leading to a massive drop in ad revenue.