---
title: "Discussion on \"How to check HTTP to HTTPS and www redirects are set up right\" | Hashnode"
description: "Discussion on \"How to check HTTP to HTTPS and www redirects are set up right\". Every site has at least four ways to be reached: http://example.com, http://www.example.com, https://example.com and https://www.example.com. Only one should be the real address. The other three shoul"
url: "https://hashnode.com/posts/how-to-check-http-to-https-and-www-redirects-are-set-up-right/6ae66f8ee94227643fae0a15"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to check HTTP to HTTPS and www redirects are set up right](https://seotto.hashnode.dev/how-to-check-http-to-https-and-www-redirects-are-set-up-right?utm_source=hashnode&utm_medium=feed)

Every site has at least four ways to be reached: http://example.com, http://www.example.com, https://example.com and https://www.example.com. Only one should be the real address. The other three shoul

Oct 31 · 5 min read · seotto.hashnode.dev  
Read the article

-   [#seo](https://hashnode.com/tag/seo)
-   [#nginx](https://hashnode.com/tag/nginx)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#devops](https://hashnode.com/tag/devops)

## Written by

[seotto.com](https://hashnode.com/@seotto)

@seotto

  
[View profile](https://hashnode.com/@seotto)

SEO monitoring tool. Crawls your site daily or hourly and alerts you when a noindex tag, robots.txt block, sitemap error or canonical change

SEO monitoring tool. Crawls your site daily or hourly and alerts you when a noindex tag, robots.txt block, sitemap error or canonical change appears. Free plan.

## Responses 1

Markdown supported · ⌘↵ to post

[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.
