How to Fix "Ads.txt Not Found" Error on Cloudways

It appears that users often encounter issues locating the ads.txt file on websites hosted by Cloudways. When the ads.txt file cannot be found, AdSense displays a warning on its page stating, "Earnings at risk - You need to fix some ads.txt file issues to avoid severe impact to your revenue."

If you're just starting a blog or have a low number of visitors, you might want to consider cost-effective hosting options like FastComet or Chemicloud. Chemicloud has also added a data center in Seoul, providing excellent speed in South Korea.

How to Resolve the Ads.txt File Not Found Issue on Cloudways

Earnings at risk - You need to fix some ads.txt file issues to avoid severe impact to your revenue

If the ads.txt status displays "Not Found," here are a few steps to check:

  1. Follow Google's guidelines to create the ads.txt file and upload it to the root folder of your site.
  2. In your AdSense account page, under Account » Settings » Account Information, ensure that Seller Information Status is set to Public rather than Internal.
  3. If your site has low visitor traffic and thus fewer ad requests, Google advises that it may take up to a month to resolve the ads.txt file issue, as detailed in Google's documentation.

For Cloudways users, you can upload the ads.txt file via SFTP by placing it in the public_html folder. When you enter https://example.com/ads.txt in your browser like Google Chrome, and it displays correctly, the file has been successfully uploaded.

For guidance on creating the ads.txt file, refer to the article "Troubleshooting the Ads.txt Not Found Issue on Google AdSense (Preventing Revenue Loss Risks)." While it's possible to install an easy solution like the Ads.txt Manager plugin, it's not recommended.

Clearing Server Cache

First, refer to the following article to see if clearing the server cache resolves the issue.

You can clear the server cache by navigating to the Server Management page of the server and clicking on Purge under Varnish.

If you encounter a "Site Cannot Be Verified" error after adding the AdSense script code for approval review, clearing the server cache can also help resolve this issue.

Site Cannot Be Verified by Google AdSense.

Note that this error may occur if the Google AdSense crawler cannot access your site. Check if the crawler is blocked by the server firewall or security plugins. Certain service providers, such as Cafe24, a popular Korean web hosting platform, may include settings that restrict access from overseas IP addresses. If blocking is in place, disabling it may resolve the issue.

Setting Cache Exceptions

If you continue to experience problems after the above measures, setting cache exceptions usually resolves the issue. On Cloudways, you should configure the Breeze cache plugin and the Varnish exceptions in the application management page to ensure that the ads.txt file is not cached.

Configuring Cache Exceptions in the Breeze Plugin

If you are using the Breeze cache plugin, navigate to Settings » Breeze » Advanced Options, and enter the path of the ads.txt file under Never Cache URL(s).

As illustrated above, it's advisable to add the paths for the sitemap, feed URLs, ads.txt file, robots.txt file, and more. You can enter relative paths (e.g., /ads.txt) instead of absolute paths for functionality.

If you are using a caching plugin like WP Rocket, you should follow the same method to set cache exceptions.

For Multisite Configurations

If your WordPress is configured in a multisite setup, do not use the Breeze network settings. Instead, check the Use Custom Settings option within each individual site (sub-site).

Log into the WordPress for each individual site in the network, go to Settings » Breeze, and change Inherit Network Settings to Use Custom Settings.

Then, as described in the section "Configuring Cache Exceptions in the Breeze Plugin," set the caching exceptions for the ads.txt file.

Setting Exceptions in Varnish Configuration

After ensuring that the ads.txt file is not being cached by the cache plugin, log into Cloudways and set up Varnish exceptions in the application management page.

From the Applications menu on your Cloudways site (①), select the application where WordPress is installed (②) to proceed to the application selection screen.

On the application management page, click on Application Settings (①) » Varnish Settings tab (②) » then click the Add New Exclusion button (③) to add a new exclusion rule.

For Type, you can choose between URL or Cookie, and here you should select URL.

In the Value field, specify a relative path (/ads.txt) instead of an absolute path (https://example.com/ads.txt). Entering /ads.txt will display as /ads.txt.

After clicking the Save button, you can send a verification request on the AdSense page, and it should be confirmed successfully.

In Conclusion

In summary, we've explored how to tackle the issue of the ads.txt file not being found on Cloudways.

Recently, it seems there's been an increase in Cloudways users. For those managing multiple sites or seeking fast loading times, Cloudways can be a viable option. Affordable hosting solutions such as FastComet or Chemicloud are excellent choices for budget-friendly shared hosting solutions.

See Also...