[Solved] How To Redirect HTTP to HTTPS Easily

2:17 PM

Since i got informationa that https being SEO Factor, i try to move some new sites into https. I buy ssl certificate from namecheap that you can get under $10 / years. I think it cheap ssl certificated. I just create a blog about wisata Blitar, that means i've try to explore small city called Blitar.

I decided to use SSL Certificated fot that site. When you type mblitar.net you will get http://mblitar.net. Since i installed SSL Cerfitiface it must be https://mblitar.net. But you need to adding some script to force visitor always using https protocol when accessed your site.
HTTPS Protocol
HTTPS Protocol
If you install certified SSL on your server, your site can be acess with http and https protocol. It can make duplicate content that will get ban from the google. So, i decided to redirect http to https.

How To Redirect HTTP to HTTPS on Wordpress

To redirect http to https you just need access to your root folder of hosting. You need to open .htaccess file. You can create it if you can't found that file on your root folder.

Write the script below on your top of .htaccess file :
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

After write that code, you can try to access your site with http if worked you will be redirected into https protocol. Just give a try, because its work on my site.

If you still get warning because ssl not install corectly, you need to buy ssl certificate on namecheap and follow step by step how to install SSL certificate.

You Might Also Like

0 comments

Popular Posts

Subscribe