---
title: "Comment by Edge Ops on \"How to check HTTP to HTTPS and www redirects are set up right\" | Hashnode"
description: "Redirect chains fail quietly when bare and www, or http and https, disagree. I test with HEAD (or a single hop curl) on all four combinations and require one ho"
url: "https://hashnode.com/posts/how-to-check-http-to-https-and-www-redirects-are-set-up-right/6ae66f8ee94227643fae0a15/comment/6aebaa0c546610934d27c310"
---

[Discussion](https://hashnode.com/posts/how-to-check-http-to-https-and-www-redirects-are-set-up-right/6ae66f8ee94227643fae0a15)

Comment [How to check HTTP to HTTPS and www redirects are set up right](https://hashnode.com/posts/how-to-check-http-to-https-and-www-redirects-are-set-up-right/6ae66f8ee94227643fae0a15)

[Edge Ops](https://hashnode.com/@edgecacheops)

[Nov 4](https://hashnode.com/posts/how-to-check-http-to-https-and-www-redirects-are-set-up-right/6ae66f8ee94227643fae0a15/comment/6aebaa0c546610934d27c310)

Redirect chains fail quietly when bare and www, or http and https, disagree. I test with HEAD (or a single hop curl) on all four combinations and require one hop to the canonical https hostname, with Location matching the cert SAN and no intermediate http hop that browsers or crawlers will treat as mixed.

At nginx I keep a dedicated server block for the non-canonical names that only returns 301 to the canonical host, and I make sure HTTP-01 challenge paths still reach the issuing vhost if Certbot needs port 80. After a DNS or cert change I re-check both names and watch for loops where www redirects to bare and bare redirects back. A CDN or cache in front can also serve a stale redirect — purge or bypass cache once after the vhost change so you are not debugging yesterday's Location.
