Istiak Mahmood
Istiak Mahmood

Reputation: 2422

URL should hit https instead of http

I am running a Windows Server, where i have hosted a site.

Now i have done the Binding with the SSL certificate for the site. But every time i hit the website URL, it goes to http instead of https. Althoough i have binded http & https with the SSL certificate.

Example -

when i try to hit abc.com

it goes http://example.com

instead of

https://example.com

Do i have to do anything more which can help me to fix this issue. so everytime i try to visit

example.com

i will visit

https://example.com

Do anyone knows a way to fix this issue !

Upvotes: 0

Views: 1079

Answers (1)

Jeroen
Jeroen

Reputation: 3583

You need to add a redirect to make sure all traffic gets redirected, something like below. Make sure you have the URL rewrite module installed.

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

Upvotes: 2

Related Questions