R2 domain: e.g. example .com, www.example .com, shop.example .com - REALLY?

For Workes & Pages, what is the name of the domain?

example . com :wink:

What is the error message?

404

What is the issue or error you’re encountering

You REALLY should change the examples you have next to R2 custom domain configuration… I just made my main website down because of these examples: e.g. example . com, www . example . com, shop . example . com

What steps have you taken to resolve the issue?

Sorry, I don’t want to be unkind, and I really appreciate what you do, all Cloudflare services, generous free tier, etc.

But because of your terrible description and examples next to R2 Custom Domain form I just made my main website down!

And I’m not the only one… I see here many people have similar issues, e.g. from @cheftech from 17 days ago: R2 custom domains
Yet, you still haven’t updated the description and examples next to the form…

I was 100% sure that this setting would allow users to access my files/images only under my main domain (so if I use R2 as CMS storage for images, and I publish these images on my landing page under the main domain, they will be accessible only when user visit my main domain if I configured it in “Public access > custom domain”).

Look at this description from the perspective of a novice in Cloudflare, even better, show it to your parents/spouse or somebody who doesn’t know your services, and ask how they understand this:

Custom domains
When a custom domain is connected to your bucket, the contents of your bucket will be made publicly accessible through that domain. Websites connected can also benefit from Cloudflare features such as bot management, Access, and Cache.
e.g. example . com, www.example . com, shop . example . com
(I had to add spaces because of your very kind limits for new users… only 4 URLs… and your error message deleted the content of the form… thx…)

I see here on the forum you (or other users) recommend using a subdomain, like cdn. or r2. - but it should be explained next to this field in the form, with better examples, that doesn’t suggest putting the main domain in this field…

And not, documentation is not enough: 1) your docs about this aren’t clear, 2) “Don’t let me think” by S.Krug, UX guru, states it clearly: good form doesn’t require checking the docs.

I know, I know, maybe I act as an as…le now, but you just made me put my homepage down, it could be annoying, right?

What are the steps to reproduce the issue?

Just add your main domain as a custom domain for R2 Public access… Cloudflare will replace your main A or CNAME DNS record with an R2 record pointing to your R2 bucket = your main page is down, 404 with Cloudflare error page… bravo me…

BTW… I had to write this message 3 times because you have a bug on this forum’s form… It didn’t allow me to use >4 URLs (yes, your examples count…) but after the error, a huge part of my message was gone… I had this issue 2 times… you need to be really determined to help Cloudflare make their services better…

1 Like

Should I create another issue/bug ticket about the forum’s form deleting messages? Or could you please add it to your backlog, please? TO reproduce: write a long message (please, spend time on it, like me, to feel the pain), in all fields, and add some prohibited word (like “as…le” - I guess you can add more than 4 URLs :wink:

Probably your message will be partially deleted. At least it was for me, 2 times, on Ubuntu 24, the newest Google Chrome.

Maybe you store it in local storage with some autosave every 30 seconds or something and it only keeps the older version? It would be a really bad practice :wink:

BTW, yes, I know, I should use the development or test domain first, not the main domain. My bad.

1 Like

Cloud Connector is getting R2 integration shortly, so in the future you will be able to associate your R2 custom domain with a hostname that is not exposed to end-users, and then route traffic to this R2 hostname via Cloud Connector. This should prevent such situations from happening altogether.

Hello @ncano - thanks for your response.

So, instead of adding a DNS record, we will be able to set a rule in Cloud Connector? For example, instead of creating a cdn.domain.com subdomain for R2, we can use folder matching, like domain.com/images, and all traffic going to this folder will be routed to our R2 bucket, yes?

But don’t we still need to create a domain/subdomain for our R2 to make it public? Will we use some internal redirection with R2 ID instead of the cdn.domain.com subdomain?

Either way, if creating a custom domain for R2 will still be an option, you really should change the examples, descriptions next to this field, and documentation to make it clearer. At least change “example.com” to something like cdn.example.com. Otherwise, people will have the same problem again and again.

And believe me, I have searched the history of this forum before I posted. Many people were misled in the same way and provided their main domain in this input field. You should really prevent this before somebody will face more severe consequences.

Just to make it clear, I mean this input:

To clarify, with the upcoming Cloud Connector integration, you’ll still need to set up a custom domain in R2, like cdn.example.com, but this integration will allow you to route example.com/images to cdn.example.com. This way, you can use example.com/images directly on your website without needing to reference cdn.example.com in your site URLs—keeping the R2 hostname invisible to end-users.

I’ve also passed your feedback to the R2 product team. We appreciate you highlighting this; clearer guidance and examples could definitely help prevent similar issues for other users. Thanks again for sharing your experience.

Thanks! Ok, so the issue with these examples will persist if people still have to create a custom domain. Hopefully, they will update it ASAP, it’s rather 1 story point ticket :wink:

And thanks for the clarification about Connector. I use PayloadCMS which uses Next.js internal API for this purpose, also hiding public bucket’s URLs behind our API. But great to have another layer of security!

1 Like