DNS Setup Help

Hello friends! I am trying to set up my DNS properly for a simple Cloudflare pages website. It currently works but the www subdomain does not. When you cUrl it it returns a 301 but in the browser somehow it resolves? I assume the browser tries a bunch of different combos to try and get you there but I am not 100% sure that's the case. The journey of the site was that I first had the domain with Google and it was hosted on Github Pages. This was fine until Google sold the domain to Squarespace. Then I wanted better CDN and serving so I switched to Cloudflare. It was an arduous journey but my domain is now being transferred from Squarespace to Cloudflare, and that should finish up on the 11th. I am no longer using GH Pages for it and all is now with a worker and pages in Cloudflare. Cloudflare builds and publishes on pushes to the main branch. I've attached the current state for refgerence. My website, https://reframinghate.com resolves just fine but not under www.reframinghate.com unfortunately and I was hoping someone may be able to help me? I'm not trying to do anything to fancy for it, just get that www to properly resolve and then I was gonna hook up the MX record for the email spoofing protection as well. Any help would be appresciated! I've been a web dev for over a decade now but never actually was the one who deployed the website and set up the DNS settings or hosting. Also, I, like many devs, love to abandon projects before they reach a deploy stage. haha Thanks for reading and I hope you all are having a lovely day.
No description
8 Replies
δΎμ„œμšΈ - Sophie πŸ¦πŸ’œ - she/they
Thank you for your reply! This is was I'm trying to do but I honestly not sure how to achieve that. Im not sure any part of that is set up correctly or if they are remnants of previously poorly done setups. Ill go give that a try here in a few. Thank you!
Dubz
Dubzβ€’4w ago
The best/quickest is to edit your current www record in the screenshot and point it to @, which will change to the root domain automatically when you save it. You'll still need to make sure the web server accepts both root and www versions though. It's a two part process. DNS is one, delivery server is the other. Wait is 100:: a thing for this? I skimmed over your answer @Leo ngl lol Ooo Would that not have unexpected results, or does Cloudflare intercept for the redirect rule?
Walshy
Walshyβ€’4w ago
Since it's proxied you'll get CF IPs meaning all traffic hits us and we run all the stuff we normally do The only weird behaviour would be trying to send traffic to origin... as there is no origin. You'd just 522 But for doing anything within Cloudflare, it's great.
δΎμ„œμšΈ - Sophie πŸ¦πŸ’œ - she/they
Okay, sorry for not having responded earlier. I'm recovering from bronshitis and napped instead. After the rest of the replies, I'm a little confused as to what to do now. Do I edit the www CNAME record to point to @ and I'm good? Something else?
Walshy
Walshyβ€’4w ago
My recommendation is what Leo said www AAAA 100:: redirect rule, hostname eq www.<domain> - redirect to https://<domain>/
Dubz
Dubzβ€’4w ago
Yeah ignore my messages, redirect and one page is best. www is irrelevant in most cases, that was an old method around internal domain networks that also have websites. Not really necessary to have tbh but old habits die hard so simple backwards compatibility like mentioned is the best option.
δΎμ„œμšΈ - Sophie πŸ¦πŸ’œ - she/they
I think I did it or at least cUrl is behaving differently. This is what things look like now.
No description
No description
δΎμ„œμšΈ - Sophie πŸ¦πŸ’œ - she/they
Thanks for the help so far getting to this point even! You all rock!

Did you find this page helpful?