Blog

/

Web Migrations

Moving from http to https: the redirects you need

·

7

min

·

Diagram of four entry points, http and https with and without www, each drawn as a line that merges into a single https://www.example.com node in orange, with one dashed line showing a second hop.

Most sites already run on https. But plenty of older sites, side projects and forgotten domains still answer on plain http, or answer on both.

Moving to https looks like flipping a switch. In practice it’s a small site migration: every URL changes its scheme, so every old http:// link needs somewhere to go.

The good news is that the redirect part is short. You need one permanent rule, a certificate on every version of the domain, and a check that nothing takes the long way round.

Why http to https counts as a migration

To a browser and to Google, http://example.com/pricing and https://example.com/pricing are two different URLs. Switching means every page gets a new address, even if nothing else changes.

Google treats it the same way. Its guide to site moves with URL changes explicitly includes http to https, recommends permanent server-side redirects and notes that they don’t cause a loss in PageRank. You don’t need the Change of Address tool for this move: it’s only for switching domains.

If the old http URLs keep working without redirecting, you end up with two copies of every page. Search engines have to pick one, and backlinks get split between them.

The one rule you need

The whole migration fits into one rule: any request on http:// gets a 301 (or 308) to the same host and path on https://.

  • http://example.com/pricing → https://example.com/pricing

  • http://example.com/blog/post?ref=mail → https://example.com/blog/post?ref=mail

Two details matter. The path has to carry over, so old deep links land on the right page instead of the homepage. And the redirect should be permanent, because the move is. If you’re unsure which code to use, see 301, 302, 307 or 308.

Most hosts and site builders have an “always use https” or “force https” setting that does exactly this. Use it rather than writing your own rule where you can.

Four versions, one destination

Every domain has four entry points: http://example.com, http://www.example.com, https://example.com and https://www.example.com. Pick one as the real address and send the other three to it.

This is where chains sneak in. A common setup looks like this:

  1. http://example.com redirects to https://example.com (the https rule)

  2. https://example.com redirects to https://www.example.com (the www rule)

That’s two hops for anyone who types the short address. It works, but each hop adds a round trip, and it’s one more thing that can break. Ideally each version goes straight to the final URL in one step. Our guides on www or non-www and redirect chains go deeper on both.

Certificates on every version

A redirect from https://example.com can only happen after the browser has a secure connection. If the certificate only covers www.example.com, a visitor on https://example.com sees a security warning before any redirect runs.

So the certificate needs to cover every hostname that receives traffic: the root domain, www, and any old or parked domains that redirect to the site. This is the most common reason a redirect works on http but not on https.

Mixed content and internal links

Redirects catch visitors arriving from old links. They don’t fix what the page itself loads.

If an https page still pulls an image, script or font from an http:// URL, browsers treat it as mixed content. They upgrade or block it, and the padlock may disappear. After the switch, update:

  • Hard-coded links in templates, menus and footers

  • Images and embeds pointing at http:// URLs

  • Canonical tags and sitemaps so they list the https URLs

  • Your own high-traffic links in email footers, profiles and ads, so visitors skip the redirect entirely

HSTS: the step after the redirect

Once everything works on https, you can add the HSTS header. It tells browsers to use https for your domain on every future visit, without asking the http version first.

HSTS doesn’t replace the redirect. The very first visit still arrives on http and needs the 301. And because browsers remember the header for as long as max-age says, only turn it on when every subdomain you include really works over https. Our HSTS glossary entry has the basics.

How to check it worked

Test all four versions of the address, plus a deep link or two. For each one you want a single permanent hop to the final https URL, then a 200.

The redirect tester shows every hop, the status code and the final destination, so a hidden second hop is easy to spot. Check again after any DNS or hosting change, and keep the redirects in place: Google suggests at least a year, and from a visitor’s point of view, there’s no reason to ever remove them.

Where Redirect Supply fits

Redirect Supply doesn’t host your website, so the https rule for your main site lives with your host or site builder. Where it helps is everything around it: old domains, campaign domains and redirect-only domains that still need https.

Every domain you connect gets an SSL certificate automatically once DNS is verified, usually within a few minutes, and it renews on its own. http and www are handled by default: http://, https://, www and non-www all land on your destination over HTTPS in one hop. There’s no setting to switch on. More on that in HTTPS everywhere.

Switch the scheme once, test the four doors, and the old http links keep working for as long as they’re out there.

Ready to keep every link alive?

Ready to keep every link alive?

Ready to keep every link alive?