Force https:// | Web.config

Force HTTPS


<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)"/>
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true"/>
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}"/>
</rule>
</rules>
</rewrite>
</system.webServer>

Force WWW to Non-WWW (or vice-versa)


<system.webServer>
<rewrite>
<rules>
<rule name="WWW to NONWWW" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.example\.com.au$" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://example.com.au/{R:1}"/>
</rule>
</rules>
</rewrite>
</system.webServer>
Want a Fast Server Like Mine?

GET VULTR!