Force SSL through web.config

Plesk Servers > SSL
If you would like to force all users to your site to use the https:// URL you can use the snippet of code below within your web.config file.  The code will need to be placed within the <system.webservers> code block, directly under the </handlers> tag.
        <rule name="HTTP to HTTPS redirect" stopProcessing="true">
        <match url="(.*)" />
        	<add input="{HTTPS}" pattern="off" ignoreCase="true" />
        <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />

Add Feedback