Force website to use on secure url

Sometime it’s become necessary to to change your hosting settings in such a way that when visitor browse your domain, the website will be loaded in https:// protocol instead of http://.

I have done similar thing on my website you might have noticed the secure bar in your browser.

SSL on suhaibmalik.net

Keeping your domain by default will give peace of mind to your website visitors as well as it will help you to increase your website pagerank as now google now recommend to have SSL enabled websites.

So here in this post I will share a quick way you can use to enable https:// by default. All you have to do is to add these piece of code in .htaccess file under your root directory.

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

Please make sure to replace yourwebsite.com with your own domain name.

Your can read reference blog post by google which will guide your about benefits of keeping your website under https:// protocol.

  1. HTTPS as a ranking signal

I am web technologist, GAIQ certified data analyst with more than 12 years of working experience in the field of web technologies.

Site Footer

Sliding Sidebar

About Me

About Me

I'm a professional Web Technologist with a certification in Google Analytics (GAIQ) based in Karachi, Pakistan. With over 12 years of experience in this field, I have gained extended knowledge and expertise in developing websites, web applications as well as data analytics.

Social Profiles

Secured by Comodo

Essential SSL
Secured By miniOrange