Migrate from HTTP to HTTPS Without Losing SEO
To migrate a website from HTTP to HTTPS, install the certificate first, then redirect with a single 301 and fix mixed content before you call the move done. Moving to HTTPS is a site move in Google's eyes, because every URL changes from http:// to https://.
1. Migrate HTTP to HTTPS: get and install a certificate
Issue a free certificate on TryFreeSSL or with an ACME client on your server. Include both example.com and www.example.com. Install the certificate with its full chain, then check it with the SSL Checker.
2. Migrate HTTP to HTTPS with a single 301
Each old URL should send visitors to its exact HTTPS equivalent in one hop. Avoid chains like http, then https, then www.
# Nginx
server {
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://example.com/$1 [R=301,L]The HTTPS Redirect generator produces snippets for other servers, and the Redirect Checker confirms the hop count.
3. Fix mixed content
A page served over HTTPS that loads images, scripts or styles from http:// URLs triggers browser warnings, and scripts may be blocked entirely. Search templates, the database and theme files for http:// references and change them to https:// or to protocol-relative paths. The browser console lists each blocked request.
4. Update canonicals, links and structured data
- Set rel="canonical" on every page to the HTTPS URL.
- Update internal links to HTTPS so users and crawlers skip the redirect.
- Change hreflang URLs, Open Graph tags and JSON-LD to HTTPS.
- Update the URLs inside your XML sitemap, which the Sitemap Generator can rebuild.
5. Update external services
Add the HTTPS version as a property in Google Search Console and Bing Webmaster Tools, submit the new sitemap, and update URLs in analytics, ad platforms, social profiles and email footers. Keep the HTTP property to watch the redirect take effect.
6. Consider HSTS last
HSTS tells browsers to use HTTPS only. Start with a short max-age, confirm nothing breaks, then raise it. Do not enable preload casually, because removal is slow. The Security Headers checker shows the header once it is set.
Migration checklist
| Check | Done when |
|---|---|
| Certificate valid | Chain complete, covers root and www |
| Redirects | One 301 hop from every HTTP URL |
| Mixed content | Console shows no blocked requests |
| Canonicals | All point to HTTPS |
| Sitemap | HTTPS URLs submitted |
| Search Console | New property verified |
After the move: monitor for two weeks
Watch the Coverage and Page indexing reports in Search Console for spikes in errors, and check server logs for 404s on HTTPS URLs that used to work over HTTP. Compare organic traffic to the weeks before the migration, allowing for normal weekly swings. If a section of the site is missing from the sitemap or has an HTTP canonical, it will show up there first.
Keep the redirects in place permanently. There is no point at which removing them is safe, because old links and bookmarks keep pointing to HTTP for years.
Related reading: HTTPS best practices for technical SEO, fixing mixed content warnings and getting a free SSL certificate.
Frequently Asked Questions
Will I lose rankings after moving to HTTPS?
Usually a small, temporary fluctuation at most, provided redirects, canonicals and the sitemap are correct. HTTPS is a lightweight ranking signal.
Should I use 301 or 302?
Use 301, which tells search engines the move is permanent.
Do I need to buy a certificate?
No. A free domain-validated certificate gives the same encryption and browser trust as a paid one for a typical site.
How long does Google take to switch?
Often days to a few weeks for most URLs, depending on crawl rate. Large sites can take longer.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.