Hello, I bought the newly created object storage s3 and would like to connect it to Cloudflare but I have a problem with it. namely url as it receives has the following format: s3.site.com/abcd12345:bucketname/file
abcd12345 is an id that is automatically added to the url. Which means the bucket name is actually “abcd12345:bucketname”
The problem is that when I try to add a CNAME record to DNS, an error pops up because I can’t add a character like “:”
Does anyone know how this can be solved differently or even mask the url in any other way?
There are several parts to a URI (check out RFC 3986 for more detail). DNS is only concerned with the Host portion, s3.site.com, so you cannot have part of the path in the DNS entry.
I have object storage s3 this is not aws but other S3. I’m trying to do url masking or add to cdn like Cloudflare however this is not possible due to the bucket name. Storage automatically adds some digits with id and the “:” character to the bucket. It looks like this: s3.objectstorage.com/11111111111111111111:bucket/file
And this is the name of my bucket: 11111111111111111111:bucket
With this character “:” I can’t add the bucket name to dns. Does anyone know how to solve this problem?
You cannot reference a URL in DNS, so while you can have a CNAME for www.example.com set to s3.objectstorage.com, but you cannot put the rest of your URL into a DNS entry. Your provider should offer a similar solution to that offered by AWS.
What you wrote doesn’t solve my problem. I do everything in the wasabi s3 tutorial, it is very similar but the problem occurs in my case with the name of the bucket.
The first is what the document you linked to uses and what is needed to put a bucket behind Cloudflare. Your description above uses the second, which you (generally) cannot put behind Cloudflare.
You might be able to do the following:
www.example.com IN CNAME s3.objectstorage.com
Then reference your objects using your bucket name: