That bright red banner in your AdSense dashboard screaming Earnings at risk is enough to make any site owner's heart skip a beat. But don't panic. While the warning looks scary, the Ads.txt status not found error is actually one of the most common and easiest issues to fix. It essentially means Google wants to verify that you, and only you, have authorized the sale of your ad inventory.

Whether you are running a standard WordPress blog or a custom-coded web application using Laravel or React, this guide will walk you through the exact steps to clear that warning and secure your revenue.

What Is Ads.txt and Why Do You Need It?

Ads.txt stands for Authorized Digital Sellers. It is a simple text file that lives on your server, introduced by the IAB Tech Lab to prevent ad fraud. Think of it as a public declaration. By placing this file on your site, you are telling advertisers: These are the only ad networks authorized to sell my ad space.

If Google's crawlers cannot find this file, or if the information inside is incorrect, they stop showing ads to protect advertisers from buying fake inventory. That is why your earnings are at risk until you fix it.

Google adsense ads txt not found error

Step 1: Get Your Unique Ads.txt Code

Before we touch any files, you need your specific publisher ID formatted correctly.

  1. Log in to your Google AdSense account.
  2. If you see the warning banner at the top, click Fix now.
  3. Alternatively, go to Sites in the left sidebar.
  4. Click on the Down Arrow next to the site status that says Not found.
  5. Click the Copy button to grab your code snippet. It usually looks like this: google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0.

Method 1: Fixing Ads.txt on WordPress

For WordPress users, there are two ways to handle this. The plugin method is easier for beginners, but the manual method is cleaner for those who care about keeping their site lightweight.

Option A: Using a Plugin (The Easy Route)

If you are not comfortable touching server files, a plugin handles this safely.

  1. Go to your WordPress Dashboard, navigate to Plugins and select Add New.
  2. Search for Ads.txt Manager.
  3. Install and activate the plugin.
  4. Go to Settings and find Ads.txt.
  5. Paste the code you copied from AdSense into the big white box.
  6. Click Save Changes.

That’s it. You can verify it by visiting yourdomain.com/ads.txt in your browser. If you see the code, you are good to go.

Option B: Manual Upload via FTP or cPanel (The Pro Route)

We generally recommend this method because it avoids adding yet another plugin to your site database. If you are optimizing your Web Development workflow, keeping plugin count low is key.

  1. Open a text editor like Notepad or VS Code on your computer.
  2. Paste your AdSense code and save the file as ads.txt.
  3. Connect to your site using an FTP client (like FileZilla) or use the File Manager in your hosting control panel (cPanel/Plesk).
  4. Navigate to the public_html folder (this is the root directory for most WordPress sites).
  5. Upload your ads.txt file directly into this folder.
  6. The file path must be public_html/ads.txt.

Method 2: Fixing Ads.txt on Custom Sites (Laravel, Next.js, HTML)

If you are building custom software or using a modern framework, you won't have a plugin system. You need to place the file where your server serves static assets.

For Laravel Projects

In a Laravel application, the root of the domain points to the public directory.

  1. Create the ads.txt file with your code.
  2. Place this file inside the /public directory of your Laravel project.
  3. The path should look like: project-name/public/ads.txt.
  4. Deploy your changes.

For Next.js / React

If you are using Next.js, static files are served from the public folder.

  1. Place your ads.txt file in the root of the /public directory.
  2. Ensure your build process includes this folder in the final output (Next.js does this by default).
  3. Verify at localhost:3000/ads.txt before deploying.

For Static HTML Sites

Simply upload the file to the same folder where your index.html resides.

Troubleshooting: Why Is the Error Still There?

You uploaded the file, checked the link, and it works. But Google AdSense still shows the red warning. This is the most frustrating part, but here is usually why it happens:

  1. The Cache Problem: If you use a service like Cloudflare or a server-side caching plugin, Google might be seeing an old, cached version of your 404 page instead of the new file. Purge your cache immediately after uploading the file.
  2. The WWW vs Non-WWW Redirect: Google's crawler checks the root domain. If your site is www.devcrea.com, ensure that devcrea.com/ads.txt redirects correctly to www.devcrea.com/ads.txt. If the redirect is broken, the crawler might get lost.
  3. Patience is Required: Google does not check your site instantly. Their crawlers re-verify ads.txt files periodically. It can take anywhere from 24 hours to a few days for the system to update and the red banner to disappear. If the file is live at yourdomain.com/ads.txt, you have done your job. Just wait for the bot to come back.

By following these steps, you ensure your Programming efforts translate into secure revenue. Don't let a simple text file stand between you and your earnings.