How create a record dns for ads.txt redirect file?

What is the name of the domain?

example.com

What is the issue you’re encountering

my network dashboard that allows me to have ads on the website keeps giving me error of ads.txt not found, in their guide they say to create a page rule through the cloudflare dashboard, I was doing that but when I click on ‘save and deploy’ I get a warning saying the following: To make sure the rule works, access the DNS records and verify that WebsiteURL.com/ads.txt or a matching wildcard record is configured as a proxy dns what does this mean? do i need to create a dns with my url with ads.txt? if so, what record should i choose? A? AAAA? TXT? i really have no idea. thanks

You should create and upload this file to your web server via FTP.

Otherwise, you could leverage Cloudflare Worker to create response on a path like yourdomain.com/ads.txt which would satisfy the needs. However, usage of the Cloudflare Workers for such case might be billed.

Example:

Tutorial:

Helpful article from Google AdSense:

Otherwise, maybe Cloudflare is blocking access to the domain.com/ads.txt file which might depend on your Security settings at Cloudflare dashboard for your zone :thinking:

@fritex hi thank you for the reply, i would like to be more specific:

the ads.txt file loaded from the website is actually a redirect, the company has their ads.txt and they advise their customers to create a redirect from my own ads.txt to their ads.txt, which is what I did, so I created rules from my ads.txt to their url

and in fact when you try to go to the website’s ads.txt page, it works, the page loads, but somehow the network dashboard says that it still doesn’t instead

I went to their guide and found that a page rule has to be created on cloudflare, I did that but when I click on ‘save and deploy’ I get that warning about dns, and so I don’t understand what it means: do I have to create a dns with the url of the ads.txt of my website?

Despite they say to redirect, I am afraid it might be network dashboard isn’t accepting the “redirect” and cannot process it, therefrom you’d have to have your own ads.txt file instead under your own domain? :thinking:

Since it should be located under a path as yourdomain.com/ads.txt, if yourdomain.com is using Cloudflare and is proxied :orange: DNS record under the DNS tab of Cloudflare dashboard of your Cloudflare account, then using above suggestions via Worker could help you to resolve this.

In case your domain is not using Cloudflare, you cannot create such DNS record.
Therefrom, if you don’t have web hosting and cannot upload the file manually via the FTP software to the specific directory such as public_html, www or some other (which might depend on the infrastructure of your Web hosting provider), I cannot advise or suggest anything else further how to proceed with this.

Two options from above are working.

May I ask if you are using Cloudflare with your domain, or not yet?

No, only your domain example.com should be proxied.

The warning message you see is just a “heads-up” notice and should not prevent you from saving and deploying the rule. (And the messaging in this pop-up is kind of confusing – it should be mentioning ONLY the hostname, and not the entire URL being redirected.)

If this does not work after saving and deploying the rule, please share a screenshot of the rule you created (with the domain visible), we could take a look for you.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.