How do I Force my Website to use SSL?

What is htaccess ?

htaccess is a configuration file for use on web servers running the Apache Web Server software.

Forcing all website traffic to use HTTPS

Use the following code in your .htaccess file

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

Forcing a specific domain to use HTTPS

RewriteEngine On 
RewriteCond %{HTTP_HOST} ^abcd\.com [NC]
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$$1 [R,L]


Common htaccess Rules

Tags: ,

supercharge your online presence today!

we understand all aspects of internet strategy but focus on design, development, and Digital marketing. We can make high-quality custom Solution with affordable price.

+ 91 9745320424,

Leave a Reply

Your email address will not be published. Required fields are marked *