How to force your site to redirect to https (SSL)

Overview

You can force your site to redirect to its secure URL by creating a configuration file and adding some code to it. To create this file, you must log into your server via FTP or SSH as described below.

When you add an SSL certificate to your website, the URL visitors use to view your site changes from HTTP to HTTPS. The 'S' ensures that your connection is encrypted.

After adding an SSL certificate you should force all URLs on your site to automatically redirect to the HTTPS version. For example, if someone visited:

http://example.com/page1

you'd want it to automatically redirect to:

https://example.com/page1

 

 

What configuration file do I need to create?

This depends on your server type. For example, your server is either running Apache or Nginx.

For Apache servers

The majority of all Hostnasi   customers are running their site on an Apache server. In this case you'd just need to create an .htaccess file for your site.

 

 

  • 0 Users Found This Useful
這篇文章有幫助嗎?

相關文章

How to generate a CSR code in your hostnasi cPanel account

  So you are on the process of purchasing an ssl certificate for your online account then you...

How to install an SSL Certificate in cPanel

SSL installation via cPanel is a pretty simple process, even if you have no special technical...

Forcing https (ssl) on htaccess file

So you need to force your website to always be available via https here is a simple method   To...

How to use SSL/HTTPS and to configure it to Magento ?

So you want to configure SSL/HTTPS to Magento ?   Well let's begin with  Magento 1.x To...

SSL certificates overview

Overview Adding an SSL certificate to your domain allows it to be accessed over a secure...

Powered by WHMCompleteSolution