Redirect HTTP to HTTPS
IIS / web.config
After setting up your self-signed SSL certificate, you'll want to make sure all users are redirected to the secure HTTPS version of your intranet. You can do this using IIS URL Rewrite rules.
Step-by-Step:
- Make sure the URL Rewrite Module is installed on your IIS server.
- Open or edit your site's
web.config
file. - Inside the
<system.webServer>
section, add the following:
<rewrite>
<rules>
<rule name="Redirect to HTTPS" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
Once saved, all HTTP requests will automatically redirect to HTTPS.
Related Pages
- Deployment Options - Learn how SimplifyIT supports cloud, on-prem, and hybrid intranet deployments
- Azure App Registration for Intranets - Enable secure API access for email, SharePoint, and login
- SSL for Intranets - Overview page covering internal CAs, Let's Encrypt, and more