Adding custom domain in public buckets DNS record issue
Im trying to add a custom domain when i do, i get this error
DNS record for this domain already exists on zone. (Code: 10056)
How can i fix it?23 Replies
let me know if you need any more info. thanks
@
is an alias for your apex, which is leaguesounds.com. If you want your bucket to run on your apex, then delete that top proxied record, and then add the bucket custom domaini see. do you mind explaining a bit how this works. like the basics
or linking me somewhere
ty. it worked!
how what works?
why deleting that works. What am i deleting exactly?
i know that adding custom domain for public bucket will allow access to files and stuff in
leaguesounds.com/myfile.jpg
etc..
thats about itIt looks like you switched over from namecheap. It imported the DNS Records it found from them, which was probably a parking page unless you had changed it before. You had to delete that record it imported, so it could create its own for the public bucket
i see. so now when i go to
leaguesounds.com
i see this. Im hosting my project using vercel, does this mean i will need to change something in cloudfare to allow the actual app show at leaguesounds.com
Yes: https://vercel.com/docs/concepts/projects/domains/add-a-domain, and you would probably want to bind your bucket to a subdomain, like r2.leaguesounds.com, not your apex
maybe i should have like
leaguesounds.com/sounds/myfile.mp3
?
change the custom domain to leaguesounds.com/sounds
?
idk just guessing hereYou can't bind on paths, only hostnames. You could do sounds.leaguesounds.com if you wanted
oh i see, yea. Was thinking it would be bad to have it on apex, like you said
i see now. think i understand whats actually happening
how would i change the it to not be the apex. Doesnt give an option here. and when i go to the records page, it says i cant edit it
You just add it as the hostname you want. When you click "connect domain", type "sounds.leaguesounds.com" (or whatever you want)
It has to be a hostname though (i.e a subdomain or your apex), can't be a path (no leaguesounds.com/sounds). Then if you are using Vercel, go through their add a domain guide and add the records they ask you
oh i see. got it, thanks
setup everything. not sure if im missing anything
i cleared my dns records on my machine too
In the Cloudflare Dashboard, under your domain/zone, and then under SSL/TLS -> Overview, switch from Flexible to Full (Strict), Magic Link: https://dash.cloudflare.com/?to=/:account/:zone/ssl-tls
that worked. can you explain why/what that does
im guessing allows 3rd party stuff like vercel
Flexible means Cloudflare uses HTTP to connect to your origin/vercel. Visitor -> HTTPS -> Cloudflare -> HTTP -> Origin. Vercel rightly is configured to redirect every request to HTTPS, but CF just returns the redirect response to the visitor and the cycle continues
i see, thanks again!
It is a sort of collective opinion that Flexible really shouldn't exist, but sadly it does. Cloudflare should try to automagically pick a higher SSL/TLS setting when you add the domain to Cloudflare, but most likely the default namecheap parking page didn't support https and thus Cloudflare picked flexible to not break your setup
Sure