do i use domain or subdomain for bucket?

I transferred a domain to cloudflare. It had one A record iirc (but after I connected it to the bucket it shows r2 record), Here's my current setup: server, database - localhost storage - r2 The development is complete, and this is the future architecture I'm considering : server - workers database - d1 storage r2 The problem I'm encountering is after I connected the domain to r2 bucket, it seems like the root domain is used for bucket as well, and whenever I try to access any file on the domain, it says The image cannot be displayed because it contains error. I'm not sure if I did the setup correctly. I want to host the website with workers on the main domain in future, so do I need to use a subdomain for bucket instead?
6 Replies
Roc8
Roc8OP2mo ago
bump
Laudian
Laudian2mo ago
You can use the Cloud Connector feature to steer traffic from your root domain to your bucket.
Roc8
Roc8OP2mo ago
i'm sorry, i didn't understand that. I already have the main (root) domain connected to the bucket, and currently I'm facing 2 issues 1. When I try to access any image stored in the bucket (with browser), it says that the image cannot be displayed because it contains errors. Is there any way I can solve this? 2. The following is what I get when I try to access the main (root) domain that I connected to bucket right now. I also plan to host the website on workers, to the main domain, so would it be possible for me to host the website on the main domain as well, along with the bucket, or should I use a subdomain for the bucket? (example : right now I have abc.com on cloudflare connected to the bucket. I get the following image when I try to access abc.com through browser. In future, if I want to host a website on abc.com as well, would it work along with the buckets, or should I connect the bucked to a subdomain like files.abc.com and have the main abc.com domain for website?)
No description
Laudian
Laudian2mo ago
1. I'm sure it can be solved, though with what little information you shared here, you can't really expect any help. 2. That's what Cloud Connector is for.
Roc8
Roc8OP2mo ago
1. what more information do I need to provide? sorry, i'm new to this 2. is cloud connector for having bothworkers and bucket work on a single domain (like abc.com) or is it for connecting workers domain (abc.com) with a bucket subdomain (files.abc.com)?
Laudian
Laudian2mo ago
1. The generally accepted format of asking for help with an error message is sharing the error message, or maybe a screenshot fo the error. A link to an image that isn't working would also help. 2. Cloud Connector allows you to use only parts of your domain for a bucket, while you use the rest for something else.

Did you find this page helpful?