webzod
account

Redirect HTTP to HTTPS on Netlify

headers.redirect.no_redirect · effort: minutes

Why it matters

Visitors who type the bare domain or follow an old link land on the unencrypted site and stay there. A permanent redirect sends every http request to the same page over https.

Staged change. Do this in stages and check each one before the next, so a mistake does not break your site or your mail.

The fix

  1. Stage 1: open Domain management, HTTPS and confirm the certificate for example.com is active and the site works over https.
  2. Stage 2: if http still serves pages, add the rule below to the _redirects file in the publish directory and redeploy.
_redirects
http://example.com/* https://example.com/:splat 301!

The examples use example.com. Replace it with your own domain.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.