❓ What Is This?
This post walks through how to redirect from http:// to https://.
🖐️ How To
Connect to your server via FTP or similar.
If you're using Lolipop, check out this official page to get set up so you can access your folders.
Add the following code to your .htaccess file.
#Redirect http to https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# end of redirect http to https
🍪 So Why Bother?
Here are the main reasons https is worth setting up.
Once you build a site, you should always configure https and set up the redirect.
- Security: HTTPS encrypts the communication between users and your website. This keeps third parties from eavesdropping on or tampering with the data. That matters a lot for sites handling sensitive information like credit card numbers or passwords.
- Trust: HTTPS proves that your website is authentic. It gives users confidence that the site they're visiting is legitimate.
- SEO: Google ranks sites that use HTTPS more favorably. In other words, switching to HTTPS can improve your search engine ranking.
- Performance: The modern HTTPS protocol (HTTP/2) is faster than the older HTTP protocol, which means your site loads more quickly.