Unable to forward root to www in Page Rule

I’m pretty new to Cloudflare and have been reviewing these threads and articles for a lot of tips that have helped. I feel like I’m almost there when it comes to moving my personal site over to a Coudflare worker-site. The last thing that is tripping me up is redirecting my root domain to my working www domain.

I’ve set up two A records in my DNS - one for the root, and one for www, both pointing to 192.2.0.1 (originless worker). Both are proxied and orange.

I’ve set a single page rule to handle the forward from josiahjophlin.dev/* to https://www.josiahjophlin.dev/$1 with a 301:

I’ve also enabled ‘Always Use HTTPS’ for my edge SSL cert, if that makes a difference at all. I think thats all I’ve done so far outside of my worker setup, but the issue still remains: I can type in ‘www.josiahjophlin.dev’ to access my site correctly (and any page within), but I cannot access the site from ‘josiahjophlin.dev’ (which does redirect to https://josiahjophlin.dev).

I’d appreciate any help offered - I’ll be excited to have this completely working.

Seems to work just fine

$ curl -I https://josiahjophlin.dev/
HTTP/2 301
date: Sun, 24 May 2020 16:07:53 GMT
cache-control: max-age=3600
expires: Sun, 24 May 2020 17:07:53 GMT
location: https://www.josiahjophlin.dev/
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare

Check your DNS resolution

Oh thats weird. I’m checking on my Mac (local dev machine) and that doesn’t resolve for me:
curl -I https://josiahjophlin.dev
curl: (6) Could not resolve host: josiahjophlin.dev

I checked on my iPad and it works fine… Okay sorry to bother you but I appreciate you leading me towards what’s really going on. Not sure what you meant by checking my DNS resolution, but I’ll start researching from there :slight_smile:

Yes, your local resolver does not seem to have the current records yet.

Either wait until it updates or try to force it if you can.

Okay, now it’s sinking in (coffee hasn’t hit me fully yet hahah). Thanks for the help!

This topic was automatically closed after 31 days. New replies are no longer allowed.