Forcing HTTPS & www on all URLs

I’ve been through the docs and believe I had this all set up correctly years ago, but just now noticed that some things aren’t working as I expect. Been through the docs and can’t seem to figure out what’s misconfigured.

My intent is 100% of the URLs are served up as HTTPS with the WWW subdomain. Any HTTP requests should be redirected to HTTPS & any naked subdomain requests should be redirected to WWW.

What isn’t working:

  • http://www.andrewconnell.com isn’t redirecting > https://www.andrewconnell.com

What is working:

  • https://andrewconnell.com > https://www.andrewconnell.com
  • http://andrewconnell.com/blog > https://www.andrewconnell.com/blog (any path)
  • http://www.andrewconnell.com/blog > https://www.andrewconnell.com/blog (any path)

My Page Rules config:
Screenshot 2023-05-24 at 7.10.35 AM

My SSL/TLS > Overview mode is set to Full (strict)

My SSL/TLS > Edge Certificates show a Universal cert is active…

  • Hosts: *.andrewconnell.com,andrewconnell.com
  • Type: Universal
  • Status: Active

… and the SSL/TLS > Always Use HTTPS is enabled

Ideas?

Forgot to include in my OP that in addition to what I listed is working, this is also working:

http://andrewconnell.com > https://www.andrewconnell.com

This host is not being proxied by Cloudflare. As a result no page rules or other Cloudflare performance/ security settings will apply to it.

2 Likes

Noob question… how did you figure this out without access to my console?

I looked up the DNS record using dig and the results were not what one would see if the hostname were proxied by Cloudflare.

dig www.andrewconnell.com

; <<>> DiG 9.10.6 <<>> www.andrewconnell.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8425
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;www.andrewconnell.com.		IN	A

;; ANSWER SECTION:
www.andrewconnell.com.	300	IN	CNAME	accom.azureedge.net.
accom.azureedge.net.	1800	IN	CNAME	accom.afd.azureedge.net.
accom.afd.azureedge.net. 30	IN	CNAME	star-azureedge-prod.trafficmanager.net.
star-azureedge-prod.trafficmanager.net.	60 IN CNAME shed.dual-low.part-0012.t-0009.fdv2-t-msedge.net.
shed.dual-low.part-0012.t-0009.fdv2-t-msedge.net. 60 IN	CNAME part-0012.t-0009.fdv2-t-msedge.net.
part-0012.t-0009.fdv2-t-msedge.net. 60 IN A	13.107.237.40
3 Likes

Awesome… thanks for the follow-up. You were correct… that was the issue. Thank you!

1 Like

Also, FWIW the 3rd rule in your original screenshot appears to be redundant. It’s already covered by the first rule.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.