Join the Webstudio community

Updated 4 weeks ago

Configuring Webstudio, Cloudflare, and Domain Setup

, I went through this for a bit and finally got it all sorted today with help from .

Here's what I needed to do.

  1. In Webstudio, make sure your project URL is to the naked domain.
  2. In Cloudflare have your CNAME to use @ (naked domain should show).
  3. In Cloudflare have CNAME record with www
  4. In Cloudflare make sure the TXT record is to naked domain, not __webstudio_is_www
  5. In Cloudflare setup page rule to 301 redirect. See image:
Attachment
CleanShot_2024-03-04_at_10.48.532x.png
O
B
J
13 comments
@Oleg Isonen It would be very helpful to add that you need to set up a 301 redirect that forwards traffic from the www subdomain to the root domain at your registrar, as Jeremy documents above.
It would be good to clarify that publishing to the root domain in Webstudio (example.com) doesn't also set up a www redirect (from www.example.com to example.com). That's a separate step.

I kept trying to redirect www-to-root in the DNS with another CNAME record as I've always done (CNAME | www | example.com). I couldn't crack the www issue until I found the post above and tried a 301 redirect at Cloudfare. Old habits die hard...
Thanks @Jeremy
I made a PR for these changes a while ago actually.
pls try to not edit multiple things at once in one PR, so one thing is not blocking the other thing, e.g. in this case I wasn't sure about these changes https://github.com/webstudio-is/webstudio-community/pull/102/files#diff-a54ce97e26df8e6249c53678e7cb2021a5ab020d8a6b76dcaba760720b4300eeL1

where others could have been easily merged
one PR in ideal case fixes one thing
this is a general rule for contributing to any repository, making it dead easy to merge what works and discuss what doesn't
e.g. avoid drive-by formatting corrections in one file and changing content in another file in one PR, while content might be great and can be great, formatting changes might be not desired and now I am stuck with merging, because I have to pull your pr, pick the changes that work and disregard other pages, create a separate pr and merge
@Oleg Isonen , no problem. I'll keep that in mind in the future.
Add a reply
Sign up and join the conversation on Discord