How to Move HTTP to HTTPS
Install a certificate on the hostname that already serves the site, then add one permanent 301 so each HTTP URL opens the same path over HTTPS. Replace leftover http images, styles and scripts so the padlock stays closed. Add HSTS last, in short max-age steps, once every check passes.
The working migration for site owners: certificate first, one clean 301, mixed content next, HSTS only at the end.
knowledge
- Read time
- 4 min
- Sections
- 6
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 15 November 2026.
What actually changes when a site moves from HTTP to HTTPS?
Moving HTTP to HTTPS means three separate jobs: a certificate is installed on the hostname people already visit, every old HTTP address is sent to the same path over HTTPS with one permanent 301, and every file inside the page that still asks for http:// is replaced. Each job has its own failure mode, which is why "I installed SSL but the padlock is open" is the most common support line on this topic.
- The certificate creates the encrypted address — its hostname must match what is in the address bar.
- The 301 redirect moves visitors and search engines, keeping the path so a blog post lands on the same blog post.
- Mixed content is any image, style or script still loaded over HTTP; the padlock stays open until it is fixed.
The reasoning behind the encryption itself — what changes for rankings and trust — is covered in HTTP vs HTTPS; this page is the working migration.
Where does the certificate get installed?
On WebJi® hosting the plan already includes a free certificate for the site you host here; in cPanel, open SSL/TLS Status and run AutoSSL for the domain and for www, and wait until the row says the certificate is installed before any redirect goes live. A redirect turned on before that point shows visitors a warning, not a padlock.
A paid certificate is a different purchase from the SSL certificate page, warranted when you need organisation validation, a wildcard, or cover for a server outside the free offer. If AutoSSL will not issue, email support@webji.services with the hostname — 24/7 support in Hindi and English, average first reply under 60 minutes; the office phone is not the route for this. Deeper certificate-side troubleshooting lives in why the SSL padlock is not working.
How do you force HTTPS with one 301 rule?
Use one redirect for the whole site — never a homepage-only rule — keep the path and query string, and decide once whether the public site is www or the bare domain so the other name joins the same destination in a single hop. Two hops in a row form a chain; two rules aimed at each other form a loop.
- Try the panel switch first: in cPanel, open Domains, select the domain, and turn on Force HTTPS Redirect where it is shown. Save, then request an inner HTTP URL before touching any file.
- If the switch is missing, put these lines at the top of the document-root .htaccess, above other rewrite rules:
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] - On Nginx, the server block listening on port 80 should do nothing but
return 301 https://$host$request_uri;— test the config and reload only when the test passes. - One enforcer only. If a CDN or a plugin also forces HTTPS, use its switch or the file, never both.
Then open an inner HTTP address in a private window: it should become the same path on HTTPS in one jump, and the page should still be that page. A certificate warning at this stage means the certificate work above is not finished — stop and fix it before hunting for a second redirect. The syntax-level detail of rewrite rules has its own page in the .htaccess 301 redirect guide, and domain-to-domain moves in redirecting one domain to another.
How do you fix mixed content after the redirect?
The redirect does not rewrite files inside the page: any stylesheet, image, script or font whose src still starts with http:// is mixed content, and the browser either blocks it or refuses to close the padlock. Convert those links to HTTPS, or to a root-relative path that carries no scheme at all.
- Search the published page source for http:// — that is the complete inventory of suspects.
- Change src and href on images, CSS and JavaScript; leave mailto links and in-page anchors alone, which are not mixed content.
- In WordPress, set both addresses under Settings → General to the HTTPS origin and replace old links stored in posts — changing the WordPress site URL walks through that save safely.
- A widget served from another host stays insecure until that host offers HTTPS; replacing it is the only fix.
For plugin-managed redirects after the migration — old permalinks, trailing slashes, changed slugs — the WordPress 301 redirects guide is the companion piece to this page: those rules govern paths within the site, while this migration rule governs the scheme.
What do you update once the 301 is live?
Add the HTTPS property in Google Search Console — or use a domain property that already covers both schemes — submit a sitemap whose addresses are HTTPS, point every canonical at the HTTPS URL you chose including the www decision, and point analytics at that same origin. Do this only after the redirect is a single hop; a sitemap of HTTPS addresses that bounce through a second redirect replaces nothing cleanly.
Skipping the Search Console step does not break the site, but it leaves you measuring the migration half-blind: you will not see which old HTTP URLs still earn impressions instead of their HTTPS replacements. The SSL certificate checker is the quick way to re-verify the certificate weeks later.
When should you add HSTS — and when must you not?
HSTS (HTTP Strict Transport Security) is a response header that tells browsers to request your site over HTTPS only, for the lifetime you declare — and it must stay off until the whole migration table below passes, because a long max-age makes browsers refuse HTTP even when your certificate is broken. That instruction lives on the visitor's computer and is genuinely hard to undo.
The measured sequence: start with a short max-age=300 (five minutes) on the HTTPS responses only, confirm nothing regresses, then raise it in steps toward the common max-age=31536000 (one year). Add includeSubDomains only when every subdomain serves HTTPS, and treat preload — submitting to browser preload lists — as a final, deliberate decision, since removal from those lists takes months. HSTS never substitutes for the 301: browsers that have never seen the header still need the redirect rule.
How do you know the move worked?
Work down this list in a private window and stop at the first failing row — the move is not done because the homepage loads; an inner page has to pass too.
| Check | What a pass looks like |
|---|---|
| Inner page address bar | https and a closed padlock |
| That page's HTTP URL | One 301 to the same path, no second hop |
| Page source | No http:// on your images, CSS or scripts |
| www and the bare domain | Both land on the one hostname you picked |
A loop means two rules disagree — most often the file and a CDN or a plugin; turn one off and retest. A padlock that never closes is mixed content or a certificate issued to a different hostname, and the SSL troubleshooting guide takes that case in full.
Frequently asked questions
Do I need to redirect every HTTP page?
Yes — one rule at the server level covers every path, including posts and product pages, and keeps the path plus query string. Per-page redirects are only for URLs whose path itself changed; the scheme change needs exactly one site-wide rule plus the www decision.
Will moving to HTTPS change my rankings?
A single 301 to the same path preserves the address search engines already know. The risks are self-inflicted: a redirect chain, a loop, or a certificate warning that blocks the page. The padlock by itself is not a ranking prize — see the HTTP vs HTTPS guide for the ranking side.
What is the difference between a 301 and HSTS?
The 301 redirects every request, including a browser's first-ever visit. HSTS is a header that instructs browsers already seen to skip HTTP entirely for the declared lifetime. They complement each other: the 301 is the migration, HSTS is the lock on the door after it — enabled last, in short max-age steps.
Can the certificate be free?
On WebJi® hosting the plan includes a free certificate for the site you host here. Buy a paid certificate when you need organisation validation, a wildcard, or cover for a server outside that offer — both kinds encrypt the connection equally.
How long does the whole move take?
The certificate and the 301 can be in place the same day when AutoSSL issues and the rule is valid; mixed-content fixes add time proportional to how many hardcoded http:// links exist. Search engines recrawl after you submit the HTTPS sitemap, on their own schedule — the browser check does not wait for that.
Last editorial update: 15 November 2026.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.