How to make your whole site use HTTPS
Your site should answer only over HTTPS, and send anyone who types the plain http:// address to the secure one with a permanent redirect. Most hosts give you a free certificate; the steps below switch on the redirect for your platform.
Last updated October 26, 2026
Not sure whether your site has this?
Paste your address. The checkup is free and shows what's flagged.
What our checkup looks for
Our free checkup requests your site over both HTTPS and plain HTTP. It flags a site with no working HTTPS, an http:// address that doesn't redirect, pages that load scripts or images over plain HTTP, forms that send to an http:// address, and servers that still accept TLS 1.0 or 1.1.
Redirect everyone to HTTPS
If http://yoursite.com still shows your site instead of redirecting, anyone on the same Wi-Fi can read or change what that visitor sees. A permanent (301) redirect sends every request to the HTTPS address.
Hosted platforms usually do this automatically once the domain is connected properly, so the fix there is often in the domain settings, not in code.
Choose where your site runs
Vercel
- Vercel serves HTTPS and redirects automatically for domains added in Project > Settings > Domains.
- If this domain isn't listed there, add it. If it points somewhere else, update its DNS records to Vercel's.
Netlify
- In Netlify open Site configuration > Domain management > HTTPS.
- Click 'Verify DNS configuration', then provision the certificate. Netlify redirects to HTTPS automatically once it's active.
Cloudflare
- In Cloudflare, open your domain > SSL/TLS > Edge Certificates.
- Switch on 'Always Use HTTPS'.
- Under SSL/TLS > Overview, choose 'Full (strict)' if your server has a certificate.
SSL/TLS > Edge Certificates > Always Use HTTPS: OnGitHub Pages
- In your repository go to Settings > Pages.
- Tick 'Enforce HTTPS' (it can take a few minutes to become available after adding a custom domain).
Nginx
- Make the port 80 server block send everyone to HTTPS:
server {
listen 80;
server_name example.com www.example.com;
return 301 https://$host$request_uri;
}Apache
- Add this to the top of your .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]WordPress
- In WordPress go to Settings > General and make sure both addresses start with https://.
- Add this to the top of your .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]Shopify
- Shopify provides HTTPS automatically for connected domains. Check that your domain shows as connected in Shopify's domain settings.
- If your domain's DNS points somewhere else (an old host), update it to the records your platform shows.
Squarespace
- In Squarespace go to Settings > Website > SSL and choose 'Secure (preferred)' and 'HSTS Secure'.
- If your domain's DNS points somewhere else (an old host), update it to the records your platform shows.
Wix
- Wix provides HTTPS automatically for connected domains. Check that your domain shows as connected in Wix's domain settings.
- If your domain's DNS points somewhere else (an old host), update it to the records your platform shows.
Webflow
- Webflow provides HTTPS automatically for connected domains. Check that your domain shows as connected in Webflow's domain settings.
- If your domain's DNS points somewhere else (an old host), update it to the records your platform shows.
Fix mixed content ('Not secure' on an HTTPS page)
An HTTPS page that loads a script, image or video over http:// is called mixed content. Browsers block insecure scripts outright and mark the page as not fully secure. Scripts are the dangerous part: anyone on the network can swap them.
The fix is to change those links to https://. On WordPress, old http:// addresses are usually stored in the database from before the site had HTTPS. A form whose action address starts with http:// has the same problem: what people type is sent unencrypted.
Choose where your site runs
WordPress
- Install the 'Better Search Replace' plugin and replace http://example.com with https://example.com in all tables (back up first).
- For third-party files, change their links to https://. Most providers support it.
wp search-replace 'http://example.com' 'https://example.com' --all-tablesAny other site
- Change every http:// link to a script, stylesheet, image or video on your pages to https://.
- As a safety net, add this directive to your Content-Security-Policy so browsers upgrade the rest:
Content-Security-Policy: upgrade-insecure-requestsTurn off TLS 1.0 and 1.1
TLS is the encryption behind HTTPS. Versions 1.0 and 1.1 have known weaknesses and every current browser supports 1.2 and 1.3, so leaving the old ones on only helps attackers.
Choose where your site runs
Nginx
- In your nginx config (http or server block), set:
- Then run
sudo nginx -tand reload.
ssl_protocols TLSv1.2 TLSv1.3;Apache
- In your SSL config (often ssl.conf or the :443 virtual host), set:
- Reload Apache. On shared hosting, ask your host to disable TLS 1.0 and 1.1.
SSLProtocol -all +TLSv1.2 +TLSv1.3Cloudflare
- In Cloudflare open SSL/TLS > Edge Certificates.
- Set 'Minimum TLS Version' to TLS 1.2.
Minimum TLS Version: TLS 1.2How to check it worked
This should print a 301 status and a Location line starting with https://. Or run our free checkup again.
curl -sI http://example.com | grep -iE '^HTTP|^location'Common mistakes
- Redirecting with a temporary (302) redirect. Use 301 so browsers and search engines remember it.
- Redirecting www and non-www to each other in a loop. Pick one address and send everything there.
- On Cloudflare, using the 'Flexible' SSL mode. It encrypts only half the trip; use 'Full (strict)' when your server has a certificate.
- Fixing mixed content on the home page only. Old http:// links often hide in blog posts and product descriptions.
What this can't tell you
HTTPS protects data on the way between the visitor and your server. It says nothing about whether the site itself is safe.
Related guides
Check your own site, free
The free checkup shows how many results are flagged and how serious. For $1, the report picks the ones that matter for your site and writes each fix for your platform, with your own domain filled in.