Sitecore and SSL

With the new rules surrounding data being increasingly more important, we must all take the necessary steps to ensure that the data being used on the sites we develop is transferred from client to server securely.

To enable SSL in your sitecore site, you will need to make sure that the following has been set.

1 – Specify the schema in your configurtation

<site name="sitename" patch:after="site[@name='modules_website']" 
targetHostName="" port="443" externalPort="80" scheme="https" />

Note: Do not place the scheme in the targetHostName. You will end up with double scheme names in your url e.g http://http://

2. Adding an IIS rewrite rule

IF you have users who load the URL via HTTP. Force them not to

 <rule name="ForceSSL" stopProcessing="true">
 <match url="(.*)" />
 <add input="{HTTPS}" pattern="^OFF$" />
 <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />