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

  • 95

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.

 

 


Was this answer helpful?

« Back

Powered by WHMCompleteSolution