• Force SSL on your website via .htaccess file

    Posted on 2020-09-30 by Atlante Avila
    force ssl on your website Force SSL on your website via .htaccess file ssl 1 150x150

    Need to force SSL on your website? We have you covered! You just need to modify the .htaccess via the code editor built into the cPanel file manager system.

    All you have to do to force SSL on your website is to add these lines to the beginning of the .htaccess file:

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


    Forcing Specific Pages

    You can target specific pages only. Simply edit the .htaccess file

    RewriteEngine On 
    RewriteCond %{HTTPS} off 
    RewriteCond %{REQUEST_URI} /[SSL Requested page]/ 
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

    Click the Save Changes button towards the top right corner of your screen.
    Check your website to ensure it is functioning as expected.


    If that doesn’t work, you can try using this instead. Just be sure to replace example.com with your domain name:

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

    Note, there are plenty of ways to do this with WordPress via the plugins repository. Simply search for SSL: WordPress.org SSL Search We don’t want to recommend one over the other, but we like Really Simple SSL. Also, it should go without saying but you will need to have an SSL certificate to get this working properly on your website. Need one of those? We offer a low-cost solution starting at only $13/year: Drummer Boy Hosting SSL Certificates

    Please be sure to reach out via chat/support tickets if you need assistance with this! We’ll be glad to help you force SSL on your website!

Get 50% off your first purchase! Use promocode queen-of-heaven

X