R2 custom domain link doesnt work
hello! Im pretty new to cloudflare and websites in general.
I have my domain hosted in Cloudflare, its active and working.
I set up an R2 bucket, added my domain and it says active and enabled. Public access also enabled.
But when I click on my object inside the bucket, and I copy the link provided in "URL custom domain" to share my object, it says "page not found" Im not sure how to share my object through a link.
What could be happening? Thank you!
13 Replies
Support AI
I'd be happy to help you troubleshoot the issue.
Based on the information you provided, it seems like you've set up your R2 bucket and custom domain correctly. However, when you try to access the object using the "URL custom domain" link, you're getting a "page not found" error.
One possible reason for this issue is that the object is not being cached by Cloudflare. By default, only certain file types are cached (https://developers.cloudflare.com/cache/concepts/default-cache-behavior/#default-cached-file-extensions). If your object is not one of the default cached file types, it may not be accessible through the custom domain URL.
To resolve this issue, you can try setting up a Cache Everything page rule for your R2 bucket. This will ensure that all files in your bucket are cached by Cloudflare, regardless of their file type. You can find more information on how to set up a Cache Everything page rule in the Cloudflare documentation (https://developers.cloudflare.com/cache/how-to/cache-everything/).
Additionally, you can also check the Cloudflare dashboard to see if there are any errors or warnings related to your R2 bucket or custom domain. This may give you more insight into what's causing the issue.
If you're still having trouble, feel free to provide more details about your setup and I'll do my best to help you troubleshoot the issue.
Sources
Feedback
Feedback has been submitted! Thank you :)
This is an AI generated response, it may not be 100% accurate. Please validate the output. You can ask followups by replying to this message or mentioning me.
What's the url?
If you have caching forced enable, you could be caching the 404 as well, would be worth purging cache for the domain/zone the custom domain is on.
This is the link: https://thecookedcreative.com/goal-setting-workbook.pdf
And thank you for answering, i'll be looking into that!
loads for me

guessing caching, you can clear CF's cache under Caching -> Configuration -> Purge everything or just purge the url. IF it's a repeated issue, you can use Cache Rules's status code override to cache 404's for less time
I keep getting
"Page not found
Sorry, but we cannot find the page you were looking for."
no matter what device I use. 😓 Thank you so much for your help!! I'll follow those instructions, it might just be caching then.
(this is a bit of a tangent, but im having another issue regarding connecting my cloudflare domain to hostinger since I cant change nameservers, i did it via DNS. Everything seems to be working fine but hostinger keeps saying my domain isnt connected, im not sure if this is a matter of concern or something you're able to assist with. or should I open another post in general-help later on? thank you once again for your time!!)
"Page not found Sorry, but we cannot find the page you were looking for."That sounds like DNS Cache, unless you mean "object not found". What's the error at the bottom?
(this is a bit of a tangent, but im having another issue regarding connecting my cloudflare domain to hostinger since I cant change nameservers, i did it via DNS. Everything seems to be working fine but hostinger keeps saying my domain isnt connected, im not sure if this is a matter of concern or something you're able to assist with. or should I open another post in general-help later on? thank you once again for your time!!)Same domain? If you're using Cf Registrar and Hostinger wants you to change your nameservers you just won't be able to, although you should be able to use any web host with just a/aaaa/cname records, shouldn't need to change nameservers, at least not from a purely technical standpoint
This is what im getting, I tried "Caching -> Configuration -> Purge everything" and didnt seem to help. Would the other suggestion of a cache rule status code override would help? or is it something else?
And yes, same domain. I added a A record with the name @ and my hostinger IP address, and a CNAME with the name www and target @. everything seems to be working, but I keep getting a "Domain not connected" message on hostinger. So im unsure if its a big deal lol

R2 Custom Domains take over the entire hostname, for example if you put it on
thecookedcreative.com
, you wouldn't be able to have other stuff on there like a normal webpage.
Most people put it on a subdomain like cdn.thecookedcreative.com
, and then you can link to it
and yea nothing in CF would help you see this faster, it's just dns cache on your end, if you're using the default DNS Resolver/haven't changed, probably all going through your ISP's resolver, and some ISPS cache for a while, although it looks like this isn't what you want anywayokay, got it!!
I've switched to a subdomain, https://files.thecookedcreative.com/goal-setting-workbook.pdf
are you able to access it?
Now i get another error, im not sure if i did it correctly

yes, loads fine for me.
It takes ~5-10s for new records to propagate on Cloudflare's end. Once you make a request to it though, it will be cached, and ISPs sometimes ignore cache ttl, so could be hours
?dns-cache
DNS cache
Resolving DNS entries is complex and involves many parties (your browser, your operating system, your router and then your ISP's resolver).
Any and all of these intermediaries can potentially cache your DNS request and serve stale content, even though you just updated it.
Quick fixes:
1. Use a different browser
2. Restart your PC
3. Change your DNS from your ISP's to Cloudflare's: https://one.one.one.one/dns/#setup-instructions
okay, as long as it works :D
I'll wait it out, im no rush. Thank you for your patience and help!!