Forcing HTTPS on All Traffic

All Web Propulsion hosting accounts include an installed cPanel SSL certificate by default. However, your website still needs to be programmed to use the HTTPS protocol in order to use the installed SSL certificate. In WordPress using the HTTPS protocol is as simple as setting the URL to https:// in the General Settings:

For non-WordPress websites, this can be accomplished using the .htaccess file. Follow the steps below to force all incoming traffic to the HTTPS protocol:

1. As with all edits, we recommend backing up the file before making any changes.

2. Go to File Manager in your hosting control panel (cPanel) and open the .htaccess file located in the public_html folder. If you can’t locate it, make sure to create or unhide it.

3. Scroll down to find RewriteEngine On and insert the following lines of code below it:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.)$$1 [L,R=301]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.)$$1 [R,L]

4. Save the changes.

5. Test the redirect by typing in a web browser. The browser should redirect to the HTTPS protocol.

Congratulations! You have successfully edited your .htaccess file and redirected all HTTP traffic to HTTPS. If you experienced any difficulty with the steps outlined above, please contact [email protected] or call (904)351-8264 for assistance.