How to correctly configure your ads.txt on Cloudflare

How to correctly configure your ads.txt on Cloudflare

Summary

If you use Cloudflare, it can sometimes challenge and block crawlers from accessing your ads.txt file, which can compromise your earnings. To prevent this, you can add a custom Configuration Rule in your Cloudflare dashboard to ensure crawlers always have uninhibited access. This guide will walk you through the necessary steps.


Why This Configuration is Necessary

SSPs must have uninhibited access to your site's ads.txt file. If demand partners cannot access this file to verify your site's supply paths, your earnings can be compromised. A common problem is that certain CDNs like Cloudflare can sometimes challenge incoming requests from crawlers, which then cannot access the required contents.

This can be avoided by adding a custom Configuration Rule in the Cloudflare Rules section. 

Step-by-Step Guide

  1. Navigate to
    Rules > Configuration Rules in your Cloudflare dashboard.

  2. Create a new Configuration Rule and give it a name, such as "Don't Block Ads.txt".

  3. Under "When incoming requests match...", select
    Custom filter expression. Set the filter to
    URI equals /ads.txt.

  4. Under the "Then..." section, click the
    "+ Add" button next to "Browser Integrity Check" and make sure this option is disabled.

  1. Click the
    "+ Add" button next to "Security Level" and set it to "Essentially Off".

  1. Save and Deploy the rule.

This will prevent Cloudflare from blocking crawlers that are trying to access your

ads.txt file.

Need Help?

If you have a question, our support is available!