Browse Month

March 2019

Updated to use HTTPS!

I’ve just enabled HTTPS on, which was fairly easy to do on Dreamhost! Here is the breakdown done in 3 steps.

1. Enable Let’s Encrypt

In the Dreamhost admin panel, click on Domains and then SSL/TLS Certificates. Now in the list of domains, click on the Add button and select the Let’s Encrypt SSL Certificate option.

2. Update all resources to https

This is probably the longest and most tedious part of converting your website from http to https. Every image, stylesheet, and script source on the website needs to start with https. For me, I manually updated the image URLs on every single post that had an image. Luckily there weren’t that many. If you don’t update the URLs, the browser will show a mixed content warning:

3. Force your site to load securely

Now for the last step, we want people who visit the http version of the website to automatically be redirected to the https version. All we have to do is open up the .htaccess file in the root directory of the website and add these lines to the very top of the file:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]