How to Enable HTTPS and Redirect Your Site from HTTP
Your site currently loads over plain HTTP. When someone visits it, the final address starts with http:// instead of https://. This guide walks you through installing a TLS certificate, permanently redirecting every HTTP request to HTTPS, cleaning up insecure links and confirming the result.

Why it matters
Chrome, Safari and Firefox label HTTP pages "Not secure", and Chrome warns before submitting forms on them, which drives visitors away. Google uses HTTPS as a ranking signal and prefers the HTTPS version when choosing canonical URLs. Several modern browser features don't work on insecure origins, including service workers, geolocation, HTTP/2 and HTTP/3 in browsers, and Brotli compression.
Without HTTPS, anything a visitor types into your site (logins, emails, payment details) can be read or altered by anyone on the same network.
What you need
Step-by-step fix
Confirm how your site is served today
Request the HTTP and HTTPS versions of your homepage and note what comes back. You will see one of three situations:
- No
Locationheader pointing to https:// means there is no redirect. - A certificate error on the https:// request means the certificate is missing or invalid.
- A redirect to https:// that then fails also points to a certificate problem.
Check both the www and non-www hostnames.
curl -sI http://example.com | head -n 5 curl -sI https://example.com | head -n 5 curl -sI http://www.example.com | head -n 5
Install a TLS certificate for every hostname
Most hosts and builders issue a free Let's Encrypt or similar certificate from their control panel. In cPanel this is under Security > SSL/TLS Status > Run AutoSSL. On your own server, use Certbot and include every hostname you serve (apex and www).
Certificate lifetimes are getting shorter across the industry, so automatic renewal is mandatory. Never rely on renewing by hand.
sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d example.com -d www.example.com sudo certbot renew --dry-run
Force a 301 redirect from HTTP to HTTPS
Every HTTP URL must permanently redirect (301 or 308) to the same path on HTTPS, in a single hop. On Nginx, give port 80 its own server block that only redirects. htaccess`.
com) and send www to it as well.
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}
# Apache (.htaccess)
# RewriteEngine On
# RewriteCond %{HTTPS} off
# RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]Switch your site's own URLs to https://
Update the base URL your CMS or app uses so generated links, canonical tags, Open Graph URLs and the XML sitemap all output https://. Then replace hard-coded http://example.com links in content, menus, templates and robots.txt Sitemap: lines. Check that each page's canonical tag points to its HTTPS URL.
<link rel="canonical" href="https://example.com/pricing/"> <meta property="og:url" content="https://example.com/pricing/">
Fix mixed content
Mixed content happens when an HTTPS page loads images, scripts, stylesheets or iframes over http://. Browsers block or auto-upgrade these requests, which can break layouts and scripts. Find them in DevTools under Console (look for "Mixed Content" warnings) or Network (filter by http:).
Change each URL to https://, or to a relative path for your own assets. As a safety net, you can send the CSP directive below.
Content-Security-Policy: upgrade-insecure-requests
Add HSTS once everything works
The Strict-Transport-Security header tells browsers to always use HTTPS for your domain, which skips the insecure first request entirely. Start with a short max-age (such as 300 seconds). Raise it to one year only after confirming every subdomain works over HTTPS.
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
Verify the redirect, certificate and Search Console
Re-run curl against the HTTP and www variants. Each should return a single 301 to the HTTPS URL, and that URL should return 200. Load a few key pages in a private window and confirm the padlock appears with no console warnings.
In Google Search Console, use a Domain property (or add the https:// URL-prefix property) and resubmit your HTTPS sitemap under Indexing > Sitemaps.
curl -sIL http://www.example.com/pricing/ | grep -iE '^(HTTP|location)'
Platform-specific notes
WordPress
Set both **Settings > General > WordPress Address (URL)** and **Site Address (URL)** to https://example.com. Then run `wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid` with WP-CLI to update links stored in the database. The HTTP-to-HTTPS redirect still has to be added at the server, host panel or CDN level.
Shopify
Shopify issues SSL certificates automatically for connected domains. If a domain shows an SSL error under **Settings > Domains**, check that its DNS A record points to 23.227.38.65 and its www CNAME points to shops.myshopify.com, then wait for the certificate to provision.
Wix and Squarespace
Both platforms serve HTTPS automatically. On Wix, check **Settings > Domains** and confirm the domain is connected. On Squarespace, open **Settings > Website > Domains > SSL**, select **Secure (HTTPS)** and keep **HSTS Secure** enabled. Remaining failures are almost always incorrect DNS records, not missing settings.
Webflow
In **Site settings > Publishing > Advanced publishing options**, turn on **Enable SSL**, then republish. Make sure your DNS records match exactly what Webflow lists for your custom domain.
Cloudflare
Under **SSL/TLS > Overview**, choose **Full (strict)** and install a valid or Cloudflare Origin certificate on your server. Avoid **Flexible**, because it leaves traffic to your server unencrypted and often causes redirect loops. Then enable **SSL/TLS > Edge Certificates > Always Use HTTPS**.
Check that it worked
✅ How to verify
- Run `curl -sI http://example.com`. You should see `HTTP/1.1 301` and `location: https://example.com/`.
- Open the site in a private window and check that the address bar shows https:// with a padlock and no "Not secure" label.
- Look at the DevTools Console on key templates (home, product, blog post, checkout) and confirm there are no Mixed Content warnings.
- Re-run this audit and confirm it reports that the site is served over HTTPS.
⚠️ Common mistakes
- Installing the certificate but never adding the HTTP-to-HTTPS redirect, so visitors and crawlers keep landing on http://.
- Using a 302 (temporary) redirect, or chaining several hops such as http://www to https://www to https://, instead of a single permanent redirect to the final URL.
- Using Cloudflare's Flexible SSL mode alongside a server-side HTTPS redirect, which creates an infinite redirect loop.
- Covering only one hostname (for example example.com but not www.example.com), which leaves certificate errors on the other.
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
Will switching to HTTPS hurt my SEO rankings?
Not if you use 301 redirects from every HTTP URL to its HTTPS equivalent and update canonicals and sitemaps. Google treats it as a site move within the same domain. Rankings usually settle within a few weeks, and HTTPS is itself a lightweight ranking signal.
Do I need to pay for an SSL certificate?
No. Free domain-validated certificates from Let's Encrypt, ZeroSSL or your host or CDN give the same encryption and browser trust as paid ones. Paid OV and EV certificates only add organization details, and browsers no longer display those prominently.
Why does my site still say "Not secure" after installing a certificate?
There are usually three causes: the HTTP version isn't redirecting, the certificate doesn't cover the hostname you visited (www vs non-www), or the page loads mixed content over http://. Check the redirect with curl and the browser console for Mixed Content warnings.
Should I use example.com or www.example.com as my HTTPS version?
Either works. Choose one, make sure the certificate covers both, and 301-redirect the other hostname to your chosen one so there is a single canonical HTTPS origin.
How to Fix the HTTP to HTTPS Redirect (301) on Your Site
How to Set Up Google Consent Mode v2 Defaults on Your Site
How to Fix Mixed Content Warnings on an HTTPS Website
How to Fix a Missing Cookie Consent Banner for Tracking Tags
How to Fix SSL Certificate Expiry and Trust Errors
How to Fix Legacy Universal Analytics (UA-) Tracking Code