Skip to the content
Start free

http:// does not redirect to https://

Visitors who type or follow an http:// address stay on the insecure version, or end up somewhere other than your https page.

High priority Security and HTTPS

Why it matters #

Many old links, bookmarks and typed addresses still start with http://. If that address shows the page itself, or redirects to another http address, the visitor never reaches the secure version, and search engines see two copies of every page.

If the http address answers "not found" or a server error, people who type your address without https:// cannot reach you at all.

How to fix it #

Add a permanent (301) redirect from every http address to the same address on https, in one step. Your host, server settings or CDN usually has a single switch for this, often called something like "force HTTPS".

Once the redirect works on every page, add Strict-Transport-Security so browsers go straight to https next time. Check both with the SSL Certificate Checker and the Security Headers Checker.

What it looks like, and fixed #

The problem
http://www.example.com/tea/   200 OK   (the page is shown on plain http)
http://example.com/tea/       301 -> http://www.example.com/tea/

The http address shows the page itself, or redirects to another http address.

Fixed
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

Every http address goes to the same path on https in one permanent step.

Fix it with your AI assistant #

Paste this into ChatGPT, Claude, Gemini or your coding agent. Fill in the words in [square brackets] first. It checks before it changes anything, changes only this, and tells you how to prove it worked.

Your instruction for the AI
On my website [your website address], built with [your platform, e.g. WordPress on Apache], http:// addresses do not redirect to https://. First check what http:// [the page address] answers, with and without www, or ask me to paste the results, and explain plainly what happens: the page is shown on http, it redirects to another http address, or it errors. Ask me whether a CDN or proxy sits in front, as the server may then not see https. Then give me one rule that sends every http address to the same path on my main https host with a single 301, for my setup: .htaccess, nginx, a hosting panel switch or a CDN setting. Rules: back up the config first, keep the path and query string, avoid redirect chains and loops (for example behind a proxy, check X-Forwarded-Proto), do not change https pages, and do not block search engines. Say exactly where the rule goes. Then tell me to re-check with the URSY.com SSL Certificate Checker at ursy.com/ssl-checker/.

We find the problems, and help you fix them

  1. Check Run a free tool or the full audit.
  2. Fix it with your AI Download your AI Fix Pack and drop it into ChatGPT, Claude or Gemini. A free account is enough.
  3. Re-check Come back, check again, and watch each fix turn green.

How the AI Fix Pack works, with a sample to download

Fix it on your platform #

WordPress

Many hosts have a "force HTTPS" switch in the hosting panel. Otherwise add the rule above at the top of .htaccess, before the WordPress block.

Shopify

Shopify redirects http to https for connected domains once the certificate is active. Check Settings, Domains if it does not.

Your server or hosting

On nginx, add a server block that listens on port 80 for your host names and returns 301 https://$host$request_uri.

Your CDN (for example Cloudflare)

In Cloudflare, turn on Always Use HTTPS in the SSL/TLS edge certificate settings.

Check it is fixed #

Run the URSY.com SSL Certificate Checker again: http should redirect to https with a 301. The Redirect Checker should show a single step.

Official source #

web.dev: Enabling HTTPS on your servers

Questions #

I added the rule and now the page loops. Why?

Behind a CDN or proxy, the server may always see plain http and keep redirecting. Use the CDN setting instead, or check the X-Forwarded-Proto header in the rule.

Should I add HSTS now?

Only after the redirect works on every page and host name. HSTS makes browsers go straight to https, so mistakes are harder to undo.

More problems in Security and HTTPS

See every problem in the library

For AI assistants and developers: Instructions for AI · Developers · How to cite URSY.com