Learn/Website

HTTPS and redirecting HTTP to HTTPS

Every visitor should end up on the https:// version of your site, sent there by one permanent redirect.

Want this checked on your own domain?

Join the waitlist

Updated

Message for whoever manages your website

Hi, could you make sure our website always uses HTTPS? The site should load at https:// with a valid certificate, both with and without “www”. Every http:// address should redirect to the same page on https:// with one permanent (301) redirect, and nothing should redirect back to http://. Thank you.

Want this checked on your own domain? Join the waitlist.

Check yours

The full domain report (join the waitlist for access) tests http:// and https:// on both names and follows every redirect. The SSL checker shows the certificate itself: the names it covers, when it expires, and its chain.

Fix it

  1. Get a certificate that covers both names (example.com and www.example.com). Your host or CDN may issue and renew one for you, and Let’s Encrypt issues certificates at no cost. The TLS certificates guide covers the details.
  2. Turn on HTTPS for both names, then open a few pages at https://. If parts of a page are missing, or the browser reports insecure content, fix that first with the mixed content guide.
  3. Redirect every http:// address to https://. Use one permanent redirect (301 or 308) that keeps the path and query. If you’ve chosen a main address (see website reachability), go straight to it. With example.com as the main address:
    Visitor asks forSent in one step to
    http://example.com/abouthttps://example.com/about
    http://www.example.com/abouthttps://example.com/about
    https://www.example.com/abouthttps://example.com/about

    If you plan to add your domain to the HSTS preload list, the http:// redirect must stay on the same name first, so http://www.example.com/about goes to https://www.example.com/about and then to https://example.com/about. Two steps are fine.
  4. Update your own links to https://: the site’s address setting (in WordPress, “WordPress Address (URL)” and “Site Address (URL)” under Settings → General), canonical links, and your sitemap. Google advises against listing http:// versions in sitemaps.
  5. Then consider HSTS, which tells browsers to skip http:// on later visits. See the HSTS guide.

Where the redirect lives. Set it in one place, at your CDN or on your server; two places that disagree can cause redirect loops.

  • Cloudflare: turn on Always Use HTTPS on the SSL/TLS Edge Certificates page (the option is hidden while the encryption mode is Off). Cloudflare recommends not also redirecting on your own server.
  • nginx: a server block for port 80 that answers every request with a redirect:
    server {
        listen 80;
        server_name example.com www.example.com;
        return 301 https://example.com$request_uri;
    }
    

    $request_uri is the original path with its query string. Use https://$host$request_uri instead to keep each name on itself.
  • Apache: in the port 80 VirtualHost, Redirect permanent / https://example.com/ sends every path to the same path on https://. Without permanent, Apache sends a temporary 302.
    <VirtualHost *:80>
        ServerName example.com
        ServerAlias www.example.com
        Redirect permanent / https://example.com/
    </VirtualHost>
    

Confirm. This command prints the status and target of the first redirect:

curl -s -o /dev/null -w '%{response_code} %{redirect_url}\n' http://example.com/

It should print 301 https://example.com/ (or 308). Repeat it for http://www.example.com/, then run the report again. Browsers may remember a permanent redirect without asking your server again (RFC 9110 §15.4.2), so check the target before you turn one on.

The site has no secure (HTTPS) version

What it means. https:// fails on every name that responds: the connection is refused, times out, or the encrypted connection (the TLS handshake) can’t be completed. Usually the site still loads over http://. If http:// redirects to https://, nothing loads at all, and the report also shows that the site redirects to an address that doesn’t load or, when the encrypted connection fails, that secure connections to the site fail.

Why it matters. Chrome shows “Not secure” on every HTTP page. Its “Always Use Secure Connections” setting goes further and asks visitors for permission before opening a public site without HTTPS; since Chrome 154 (September 2026), that setting is on by default. Without encryption, someone on the same network, such as a shared Wi-Fi network, can read what is sent and change pages on the way (RFC 6797 §2.3.1). Google also prefers the HTTPS version of a page when choosing which address to show in search.

Fix.

  1. Get a certificate for both names, as in step 1 above.
  2. Turn on HTTPS at your host or CDN so the site answers on port 443.
  3. Add the http:// to https:// redirect.

Confirm. https://example.com opens without a warning, the SSL checker shows a valid certificate, and the report shows that visitors are sent to the secure site.

The site doesn’t require HTTPS

What it means. The site works over https://, but http:// addresses still show the page over http:// instead of redirecting.

Why it matters. Old links, bookmarks, and typed addresses that start with http:// keep visitors on an unencrypted page. Current Chrome, Safari (since 18.2), and Firefox (since 136) try https:// first. Safari and Firefox fall back to http:// when that fails, and Chrome, since version 154, asks the visitor first unless they visit the site regularly. But an attacker on the network can make the HTTPS attempt fail, and other browsers, apps, and tools follow the link as written. The redirect also tells search engines which version is the real one; Google recommends redirecting HTTP pages to HTTPS.

Fix. Add the http:// to https:// redirect at your CDN or on your server, as shown above. On Cloudflare, that is Always Use HTTPS.

Confirm. The curl command above prints a 301 or 308 and an https:// address for each name.

The secure site sends visitors to the insecure one

What it means. https:// works (the connection and certificate are fine), but it redirects to an http:// address.

Why it matters. Visitors lose encryption on the page they land on. Google says an HTTPS-to-HTTP redirect makes it prefer the HTTP version very strongly, and HSTS can’t override that. If HSTS is on, browsers turn the http:// target back into https://, and visitors are stuck in a loop.

Some sites do this on purpose: Chrome’s advice for a site that can’t support HTTPS yet is to not answer on port 443 at all, or to redirect https:// back to http://, so browsers that try HTTPS first fall back cleanly. If that’s your situation, the lasting fix is to make the site work over HTTPS.

Fix.

  1. Find the redirect that targets http://, at your CDN, on your server, or in the site’s own settings, and check that the site’s address setting begins with https://.
  2. Remove it, make sure the page works over https://, and redirect http:// to https:// instead.

Confirm. curl -s -o /dev/null -w '%{response_code} %{redirect_url}\n' https://example.com/ prints 200, or a redirect to another https:// address.

Technical reference

What the report checks

The HTTPS check uses the same requests as the reachability check: http:// and https:// for example.com and www.example.com, following each redirect. It looks only at names that respond, tests only the homepage path /, and doesn’t run when the site forwards to another domain.

ResultCondition
No secure versionFor every responding name, the first https:// request was refused, timed out while connecting, failed the TLS handshake, or got no complete response in 15 seconds
Doesn’t require HTTPSA name’s http:// chain ends on a page served over http:// (a 2xx response that isn’t a bot-protection page), and the name isn’t on the HSTS preload list
Browsers always use the secure siteNames whose http:// chain ends that way are all on the HSTS preload list, so browsers never request them over http://
Sends visitors to the insecure siteA name’s first https:// request got a response, and its chain ends on an http:// URL
Visitors are sent to the secure siteNone of the above

A certificate that fails verification isn’t reported here; the TLS certificates guide covers it. The check accepts any redirect status; it doesn’t grade 301 against 302.

Redirect status codes

StatusNameRequest method on the next requestHeuristically cacheable (RFC 9110)Google treats it as
301Moved PermanentlyA client may change POST to GETYesPermanent
302FoundA client may change POST to GETNoTemporary
303See OtherGET or HEADNoTemporary
307Temporary RedirectUnchangedNoTemporary
308Permanent RedirectUnchangedYesPermanent

Sources: RFC 9110 §15.4.2 to §15.4.9; Google Search Central, Redirects and Google Search. RFC 9110 notes that 308 is much younger (June 2014) than its sibling codes and might not be recognized everywhere (§15.4.9). For a homepage, where requests are GET, 301 and 308 behave the same.

RFC 6797 §7.2 says a site using HSTS should answer plain-HTTP requests with a permanent redirect, such as 301, to the https:// address. The HSTS preload list additionally requires that redirect to stay on the same host (hstspreload.org).

Browser behavior

  • “Not secure”. Chrome has marked every HTTP page “Not secure” since Chrome 68 (July 2018).
  • HTTPS first. Chrome and Safari upgrade HTTP navigations to HTTPS automatically (hstspreload.org). Safari 18.2 “Changed to prefer HTTPS navigations by default” and added automatic fallback to HTTP. Firefox 136 “now upgrades page loads to HTTPS by default and gracefully falls back to HTTP”. Chrome’s upgrades also fall back to http:// when HTTPS fails, and Google notes they “can’t protect against active network attackers”; since Chrome 154, Chrome warns before that fallback (below). Only HSTS removes the fallback.
  • Warning before HTTP. Chrome’s “Always Use Secure Connections” attempts every connection over HTTPS and shows a warning, which the visitor can bypass, if HTTPS is unavailable. Since Chrome 154 (September 2026), it is on by default (Chrome 154 release notes). Google said the default covers public sites only, and Chrome doesn’t repeat the warning for a site the visitor regularly uses.
  • Search. Google prefers HTTPS pages as canonical unless the certificate is invalid, the page has insecure dependencies other than images, the page redirects to or through HTTP, or its canonical link points to HTTP.

Sources

Want this checked on your own domain?

Join the waitlist
Domain Readiness

Free checks for email, website, DNS, and registration, with plain-English fixes.

Domain Readiness™ (domainreadiness.com) is a service of Riviera Learning, LLC.