Guide
HTTP, HTTPS, and www Redirects: How to Check Them
How to check an http to https redirect, the www host, and the bare host, so all four addresses land on one final URL in a single permanent hop.
By Abid Ali, maintainer of OG Scope
Published

An http to https redirect sends the insecure address to the secure one. A www redirect does the same job for the host name. The useful result is one final URL. The other three addresses, http and https on both the www host and the bare host, should reach that URL in a single hop.
Google treats a change from HTTP to HTTPS as a site move with URL changes, the same class of move as a new domain or a new path. Switching between www and the bare host on the same domain is also a URL change. The status codes for a permanent or temporary hop stay on the 301 vs 302 guide. How to read a longer chain, and how a loop repeats a URL, stays on the redirect chains and loops guide. A trailing slash changes the path, so it is a separate check from the host and the protocol.
The four addresses
Pick one page that already exists, such as the homepage or a post, and write all four forms:
http://example.com/pricing
https://example.com/pricing
http://www.example.com/pricing
https://www.example.com/pricingOne of those four is the address you want people and crawlers to keep. The other three should answer with one permanent redirect to that address, then a 200. Paste each full address, scheme included, into the redirect checker. A host typed with no scheme is requested as https, so the http address is never tested unless you type http://.
What a single hop looks like
When the chosen address is https://www.example.com/pricing, each of the other three checks has two rows. The http bare host looks like this:
1 301 http://example.com/pricing
2 200 https://www.example.com/pricingThe https bare host and the http www host follow the same shape: one 301, then the same 200. The chosen address itself should be a single 200 with no redirect. The same pattern works if the bare host is the one you keep. Then https://example.com/pricing is the 200, and the www forms are the ones that redirect.
Google's site-move documentation recommends a server-side permanent redirect, such as 301 or 308, from each old URL to its new URL. A 302 says the move is temporary. For a host and protocol you intend to keep, the permanent codes are the ones that page names.
The extra hop through a third host
A common chain does the protocol first and the host second:
1 301 http://example.com/pricing
2 301 https://example.com/pricing
3 200 https://www.example.com/pricingThe middle row is a third host. The first address could have pointed straight at the final URL. Google's site-move page says to redirect to the final destination directly. Googlebot can follow up to 10 hops. When a direct hop is not possible, the same page says to keep the chain low, ideally no more than 3 and fewer than 5. Each extra hop is another request for the visitor and another request for the crawler.
A hop that leaves https and lands on http sends the visitor back to an insecure address. The redirect checker notes an http address that forwards to https, a hop that drops from https back to http, and a chain that ends on a different host from the one you entered.
One host, one protocol
Choose https, and choose either www or the bare host. Use that pair on every page. A blog on www and a shop on the bare host splits the site into two names.
Search Console does not need a Change of Address request for an HTTP to HTTPS move, or for a switch between www and non-www on the same domain. That tool is for a move to a different domain or subdomain, such as example.com to example.net. Verify each variant you still serve: the www host and the bare host, on both http and https. Google's site-move page asks for all of those properties when you use HTTPS URLs.
A 2015 Google Search Central note says that when an HTTP URL and an HTTPS URL on the same domain look like the same page, Google typically indexes the HTTPS URL when a set of conditions hold. The ones this check can see are: the HTTPS page does not redirect to or through an insecure HTTP page, it does not carry a canonical link to the HTTP page, and the server has a valid TLS certificate. The note also lists insecure dependencies, a robots.txt block, a noindex tag, HTTP links to your own pages, and which URL the sitemap lists. Pointing the other three addresses at the HTTPS URL in one hop is the redirect half of that preference. HSTS, the Strict-Transport-Security header, is a separate response the browser remembers. The redirect checker does not test it.
What the final page should publish
The page that returns 200 should name itself. Google's site-move page says each new URL should have a self-referencing canonical link:
<link rel="canonical" href="https://www.example.com/pricing" />If that link still points at the http address, or at the other host, the redirect and the tag disagree. The og:url guide covers the same match for the Open Graph URL: the canonical address and og:url should be the final URL.
The sitemap should list the chosen host, not the three addresses that redirect. Submitting that file is covered in the guide to submitting an XML sitemap. Search Console may warn that URLs in an old sitemap redirect. Google's site-move page says that warning is expected while the old URLs are still listed, and that the new sitemap is the one whose indexed count should rise.
Keep the redirects in place for a long time. The same documentation says generally at least one year, so crawlers can transfer signals, and it suggests keeping them for visitors indefinitely. Update links you control so they already use the final URL. A redirect is slower than a direct request. 301 and other permanent redirects do not cause a loss in PageRank, according to that same site-move page.
Host mistakes that a homepage check misses
Check a deep path on all four addresses. A post that stays on http, returns 404 on one host, or takes a second hop is a miss even when https://www.example.com/ returns 200.
Redirecting every old URL to the homepage is a different miss. Google's site-move page says sending many old URLs to one irrelevant destination, such as the home page, can confuse visitors and might be treated as a soft 404. A removed page can return 404 or 410. A page that moved should redirect to its own new URL.
A certificate that covers only www leaves https://example.com unable to finish the hop, even when the redirect rule is correct. Both host names need a certificate the browser accepts before the https checks mean anything.
A temporary 302 on a host you intend to keep leaves the old URL in play. Switch that hop to a permanent code when the final host is settled. After the pattern is right on one page, paste the four forms of other important URLs into the checker's bulk list, up to 1,000 lines, and filter for chains and temporary redirects.
Run the four checks
- Write down the one URL you want to keep, including https and the host.
- Run the other three full addresses in the redirect checker, with the scheme typed out.
- Confirm each result is one permanent hop to that URL, then 200.
- Open the final URL and confirm the canonical link uses that same address.
- Repeat the four addresses on one deep path.
When those four addresses agree, paste the final URL into the Open Graph checker and read the tags on the page that actually loads.
Check the live URL
Paste the page into the Open Graph checker to see the tags the server sends.
Open the Open Graph checker

