Forcing SSL is ideal to enforce security settings. It is recommended that you enable this if you have a valid SSL Certificate installed. Please use the instructions below for your type of web hosting plan Linux or Windows.
NOTE: If using WordPress, you will need to update your HOME / BASE URL while making these changes.
Linux Accounts
ENABLING HTTPS (Linux Hosting)
HTTPS Redirects automatically changes insecure requests (http://) to secure requests (https://).
To enable HTTPS for your site, follow these steps:
- Navigate to the ~/public_html directory.
- Open the .htaccess file or create a new one.
- Copy the code below, and then paste it into the .htaccess file.
- Save your changes to the .htaccess file. HTTPS is now enabled for your site.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Windows Accounts:
Forcing HTTPS (Windows Hosting)
To force SSL for your site using web.config, follow these steps:
- Navigate to the wwwroot directory
- Open the web.config file.
- Copy the following lines into the web.config file. Add these rewrite rules to implement HTTPS in the Web.Config for any domain.
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect HTTP to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
Contact Support
If you are still having issues, please contact us for further help.
1-877-EPHOST1 | support@ephost.com