HTTP to HTTPS redirect check

Short answer

People still type your address without https://. A permanent (301) redirect from http:// to https:// makes sure they end up on the encrypted site instead of an insecure copy. It's worth 10 of 100 points in a SiteShield grade, and on Cloudflare it is a single switch: Always Use HTTPS.

EncryptionWorth 10 of 100 pointsBy Mumshad JawadUpdated

What is HTTP to HTTPS redirect?

When someone types example.com or follows an old link, the browser usually tries http://example.com/ first. The server should answer with a 301 Moved Permanently pointing to the https:// address. A 301 also tells search engines which version is the real one, so ranking signals aren't split between two copies.

Why it matters

Visitors who type your address without https:// land on an unencrypted page first, which an attacker on the same network can hijack.

If http:// serves the page instead of redirecting, the first request travels unencrypted. On shared Wi-Fi, an attacker can intercept that request and keep the visitor on a fake, unencrypted version of your site (an "SSL stripping" attack). The redirect closes most of that gap, and HSTS closes the rest.

SiteShield maps this check to:

OWASP ASVS V9PCI DSS 4.0 Req. 4.2

See how these standards fit together in the UAE website security checklist.

How SiteShield grades it

This check, "http:// redirects to https://", can cost up to 10 points: a fail loses all 10, a warning loses 5. Every scan starts at 100.

ResultWhenPoints lost
Passhttp:// answers with a 3xx redirect whose Location is an https:// address.0
PassThe site doesn't answer on plain http:// at all, so nobody can land on an insecure page.0
Failhttp:// redirects somewhere that is not https://, or serves the page directly without redirecting.10

How to check it yourself

Request the http:// address without following redirects and look at the status line and Location header:

curl -sI http://example.com | grep -iE '^(HTTP|location)'
# HTTP/1.1 301 Moved Permanently
# Location: https://example.com/

Or run a free SiteShield scan, which checks this and 16 other settings in one go.

How to fix it

The quick version: Add a permanent (301) redirect from http:// to https:// on your server or CDN. On Cloudflare: SSL/TLS → Edge Certificates → Always Use HTTPS.

Cloudflare

Go to SSL/TLS → Edge Certificates and switch on Always Use HTTPS. Cloudflare then answers every http:// request with a 301 to https://.

Nginx

Add a separate server block for port 80 that only redirects:

server {
    listen 80;
    listen [::]:80;
    server_name example.com www.example.com;
    return 301 https://$host$request_uri;
}

Apache

In the port-80 virtual host (or in .htaccess if you can't edit the server config):

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

WordPress

  1. Make sure both addresses in Settings → General start with https://.
  2. Use your host's "Force HTTPS" switch if it has one; otherwise add the Apache rule above at the top of .htaccess, above the # BEGIN WordPress block.

FAQ

Should I use a 301 or a 302 redirect?

Use 301 (or 308). A permanent redirect is cached by browsers and tells search engines to index the https:// version. A 302 is temporary, so search engines may keep the http:// URL.

Why does SiteShield pass a site that doesn't answer on http:// at all?

If port 80 is closed, a visitor can't land on an insecure page, so there's nothing to redirect. Browsers will show an error for http:// links though, so a redirect is friendlier.

Is the redirect enough on its own?

No. The first http:// request can still be intercepted before the redirect arrives. Add an HSTS header so browsers go straight to https:// on later visits.

Test your HTTP to HTTPS redirect now

Run all 17 checks on your website and email domain in about 30 seconds. Free, no signup, passive checks only.

Rather not do it yourself? Fix it for me starts at AED 750 (about USD 205 by PayPal), quote agreed first. Monitoring re-scans weekly for AED 99/month or AED 990/year.

Related checks

See all 17 security checks →