If you’re seeing an “Ads.txt not found” error in your Google AdSense dashboard, it’s important to fix it to ensure that your ads run properly, and your earnings are not affected. Here’s a step-by-step guide to resolving the issue and making sure your ads.txt file is correctly set up.
What is Ads.txt?
The ads.txt (Authorized Digital Sellers) file is a simple text file that helps protect your site from unauthorized reselling of ads. It’s a vital component for websites that use AdSense or other ad networks to ensure only approved sellers are selling your ad inventory.
Steps to Fix the Ads.txt Not Found Issue
1. Download the Ads.txt File from AdSense
- Log in to your Google AdSense account.
- If there is an error, youโll see a notification that says something like “Earnings at risk โ You need to fix some ads.txt file issues.”
- Click on the Fix Now button.
- Download or copy the contents of the ads.txt file that AdSense provides. It will typically look like this:rustCopy code
google.com, pub-***************, DIRECT, f08c47fec0942fa0
2. Create the Ads.txt File
If you don’t already have the ads.txt file, follow these steps to create it:
- Open a text editor (such as Notepad or TextEdit).
- Paste the content provided by AdSense.
- Save the file as ads.txt.
3. Upload the Ads.txt File to Your Website
- Log in to your website’s cPanel (or use an FTP client).
- Go to the File Manager and navigate to your public_html directory (root directory).
- Upload the ads.txt file to the root folder. Ensure itโs placed in the correct location (not inside any subfolders).
- You can verify the file by visiting
https://yourdomain.com/ads.txt
in your browser.
4. Verify Ads.txt File Accessibility
Ensure the file is accessible to both users and crawlers by visiting:
https://yourdomain.com/ads.txt
(For non-www version)https://www.yourdomain.com/ads.txt
(For www version)
Both should be working. If one version doesnโt work, set up proper redirects between the www and non-www versions of your website.
5. Clear Cache
If youโre using caching (via a CDN like Cloudflare or caching plugins in WordPress), clear both your site cache and CDN cache to ensure the latest version of your ads.txt file is being served.
- Clear cache from your WordPress caching plugin (e.g., WP Super Cache, W3 Total Cache).
- Clear your CDN cache if you use services like Cloudflare.
6. Check for HTTP vs. HTTPS Redirection
Ensure that both HTTP and HTTPS versions of your website are working. For example, check:
http://yourdomain.com/ads.txt
https://yourdomain.com/ads.txt
If your site is using HTTPS, make sure that the HTTP version properly redirects to HTTPS.
7. Check the Publisher ID
Ensure that the Publisher ID in your ads.txt file is correct:
- Your publisher ID in the file should match exactly with what is listed in your AdSense account. Go to AdSense > Account > Account Information to verify it. It should look something like this:rustCopy code
google.com, pub-3801062597533380, DIRECT, f08c47fec0942fa0
8. Wait 24โ48 Hours
Even after uploading the file correctly, it can take up to 24โ48 hours for Google to detect the ads.txt file and remove the warning from your AdSense dashboard.
9. Check for Crawl Issues in Google Search Console
If the issue persists:
- Visit Google Search Console and inspect the URL
https://yourdomain.com/ads.txt
. - Make sure Google is able to crawl and access the file.
10. Verify Site in AdSense
Ensure that your site is verified in AdSense:
- Go to Sites in your AdSense dashboard and make sure your site is listed and marked as Ready.
11. Check with Hosting Provider
If none of the above steps work, contact your hosting provider and ask them to:
- Check for any restrictions in the server settings or
.htaccess
file that might prevent the ads.txt file from being accessible. - Ensure that there are no blocks on Googleโs crawlers from accessing your file.
Conclusion
By following these steps, your ads.txt file should be accessible, and the warning should be resolved within a day or two. Properly configuring the ads.txt file is critical for securing your ad revenue and ensuring that only authorized advertisers can run ads on your site.
If the problem persists after trying all these solutions, it may be time to contact Google AdSense support for further help.