Hosting » HostGator » How do I force https on WordPress HostGator?

How do I force https on WordPress HostGator?

Last updated on December 19, 2022 @ 1:51 pm

Adding HTTPS to WordPress on HostGator

Adding HTTPS to WordPress on HostGator is easy. Just follow these few steps:

1. Log in to your HostGator account.

2. Click on the “Settings” menu item.

3. In the “Site Security” section, click on the “SSL/TLS” button.

4. In the “SSL/TLS Settings” window, click on the “Add Site” button.

5. In the “Add Site” window, enter the following information:

  • The site name (e.g.“mysite.com”).
  • The domain name (e.“example.
  • The port number (e. 443)
  • The certificate name (e. “localhost”)

6. Click on the “Add Site” button.

7. Click on the “SSL/TLS” button.

8. In the “SSL/TLS Settings” window, click on the “SSL/TLS” button.

9. In the “SSL/TLS Settings” window, click on the “Enforce” button.

10. In the “SSL/TLS Settings” window, click on the “Activate” button.

11. In the “SSL/TLS Settings” window, click on the “OK” button.

12. Click on the “Site Security” tab.

13. In the “SSL/TLS” section, click on the “Confirm” button.

14. Click on the “Close” button.

15. In the “SSL/TLS” section, click on the “SSL/TLS” button.

16. In the “SSL/TLS Settings” window, click on the “Advanced” button.

17. In the “SSL/TLS Settings” window, click on the “Add Certificate” button.

18. In the “Add Certificate” window, click on the “Browse” button.

19. In the “Browse” window, enter the following information:

  • The certificate file name (e.“localhost.crt”).
  • The certificate file path (e. “C:\Program Files (x86)\HostGator\apache2\conf\”)
  • The certificate file password (e. “password”)

20. Click on the “Browse” button.

21. In the “Add Certificate” window, click on the “OK” button.

22. In the “SSL/TLS Settings” window, click on the “Save” button.

23. In the “SSL/TLS Settings” window, click on the “Disable” button.

24. In the “SSL/TLS” section, click on the “SSL/TLS.

PRO TIP: If you are using WordPress on HostGator, you may have noticed that https is not forced by default. This can pose a security risk as data transmitted over http is not encrypted.

To force https on WordPress HostGator, you will need to edit your .htaccess file.

Add the following lines of code to the top of your .htaccess file:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

Replace www.example.com with your own domain name.

Save and close the file.

Now when you visit your WordPress site, https should be forced.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.