Published on: 07 Apr, 2021

How to redirect HTTP to HTTPS using URL Rewriter in IIS?

Tumblr Digg Google Plus

If you need to automatically redirect HTTP to HTTPS in IIS. You can use the help of the URL Rewriter plugin in IIS.

In your .Net web config file under the root folder of your site application. There is a section under system.webServer, you can pass the following rule code.

			<rule name="Redirect to HTTPS" stopProcessing="true">
				<match url="(.*)" />
					<add input="{HTTPS}" pattern="^OFF$" />
				<action type="Redirect" url="https://{HTTP_HOST}{UNENCODED_URL}" appendQueryString="false" />


There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.