Join the Webstudio community

Updated 4 weeks ago

www redirect : how does it work ?

I don't understand why this documentation https://docs.webstudio.is/university/foundations/publishing-and-custom-domains and this one https://developers.cloudflare.com/rules/url-forwarding/examples/redirect-www-to-root/ don't mention the need to create a CNAME redirecting www to the root domain.

Without this CNAME, I can't do the redirection, the Clouflare redirection rule doesn't work. Am I wrong? Have I missed something?
J
B
10 comments
You are somewhat correct. There needs to be a DNS record in order for Cloudflare to do anything with it. If you don't add www. then Cloudflare isn't actually seeing the request come through.

However, it does not need to be a CNAME. Actually it should be a dummy record... ie a record that points to cloudflare's reserved dummy ip just for this kind of stuff.
Ill look at updating the docs
What's the best possible configuration? I'm not technical enough to understand all the details of this subtlety, I just want the redirection to be done properly and not be penalised.
Cloudflare doc does not mention the problem either, I find it weird
just updated the doc. See if that works
should this record be proxied ? is it the @ or the www to the ip adress ?
Yes it should be

Cloudflare rules can't apply to traffic that isn't proxied through Cloudflare.

But maybe I should add it next to the IP address too.

@ vs www it depends. It would be the one you are redirecting.
If you're redirecting www then add www and point to that IP
that works perfectly thank you
Add a reply
Sign up and join the conversation on Discord