
Installing an SSL certificate does not automatically make visitors use it. Until you redirect HTTP to HTTPS, people can still reach the insecure version of your pages through old links, bookmarks, and typed addresses. A correct redirect sends every request to the secure version of the same page, so visitors and search engines see one consistent site.
www and non-www versions. If you have not chosen one yet, read how to choose between www and non-www.The most common cause of redirect loops is having the redirect configured in several places at once. Pick one method and remove the others.
Many hosting control panels have a “force HTTPS” toggle for each domain. This is usually the simplest and safest option. Our overview of what a hosting control panel offers describes the kinds of settings you can expect.
On Apache-style servers, a rule in .htaccess can send all insecure requests to HTTPS:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
Back up the file before editing. Our article on the .htaccess file explains how to edit it safely.
Some applications and plugins can enforce HTTPS themselves. This works, but avoid combining it with a server-level rule unless you know they do not conflict.
If a CDN or reverse proxy sits in front of your server, the connection between the proxy and your server may be plain HTTP. A server rule that checks HTTPS off can then redirect endlessly. In that case configure the redirect at the proxy, or have the server read the forwarded protocol header.
A 301 redirect tells browsers and search engines that the move is permanent. Avoid temporary redirects for this purpose, since they signal that the original address may return.
http:// versions of your home page and a few deep pages, with and without www.https:// address after one redirect, not a chain.This indicates a loop. Look for duplicate redirect rules, a proxy or CDN in front of the site, or application URL settings that disagree with the server. Disable all but one redirect and retest.
These appear when a secure page loads images, scripts, or styles over HTTP. Update the URLs in your content and templates, or use a reputable search-and-replace tool on the database after taking a backup.
If visitors see a warning after you redirect, the certificate may be expired, may not cover the hostname, or may be missing intermediate certificates. If the site shows a server error instead, see how to troubleshoot an HTTP 500 error.
Done correctly with permanent redirects, it should not. Search engines treat HTTPS as the preferred version, and they follow the redirects. Problems arise mainly from loops, chains, or leaving mixed content in place.
No. A single rule or setting can cover the whole site while preserving the path of each page.
The redirect works as soon as it is active. Browsers and search engines may take longer to update their records, so monitor for a few weeks.
Need hosting that makes this easier? Explore GaugeHosting web hosting plans and get a setup built for reliable, well-supported websites.