HTTP to HTTPS Redirection - IIS

ABACOHosting Windows servers supports IIS URL Rewrite module. You can make use of this module to automatically redirect your visitors from HTTP to HTTPS.

Setting the HTTPS Redirection

1. Ensure that the Digital Certificate is properly installed on your Hosting Order, and the site is resolving on https://yourdomainname.com.

Note: Your site will work on https://yourdomainname.com or https://www.yourdomainname.com or https://subdomain.yourdomainname.com, depending on the Common Name for which you had the certificate issued. Resolving HTTPS on anything other than this Common Name would result in a certificate name mismatch error.

2. Create a web.config file under the site's directory and add the following lines to it. In case there already exists a web.config in your site's directory, carefully edit it to add these lines:

 
   <?xml version="1.0"?>
    <configuration>
      <system.webServer>
         <rewrite>
                   <rules>
                   <rule name="Redirect to HTTPS" stopProcessing="true">
                   <match url="(.*)" />
                        <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" />
                        </conditions>
                   <action type="Redirect" url="https://<common_name>/{R:1}" redirectType="Permanent" />
                   </rule>
                   </rules>
         </rewrite>
      </system.webServer>
    </configuration>
                     

    <common_name> needs to be replaced by the Common Name for which the Digital Certificate is issued.

  • plesk
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Ports open for outgoing connections

Abaco Hosting has opened the following ports for outgoing connections on its Hosting Servers:...

Backup/Restore Policy

We undertake periodic backups of data on our shared hosting servers, but the final responsibility...

Switching PHP version Plesk

Plesk Hosting Abaco Hosting supports PHP 5.2, 5.3 and 5.4 on its Plesk Hosting Servers, with PHP...

Shared Hosting Limitations

All websites hosted on ABACOHosting Shared Web Hosting servers are actively monitored, to ensure...

PHP Cannot modify header information

Warning: Cannot modify header information - headers already sent by (output started at...

Powered by WHMCompleteSolution