Reputation: 486
why do I need to type https before my site URL every time in the browser? Tho my website has SSL enabled it's going to default IIS page. Please help me with this.
This url i'm typing in browser -- fdrms.visiontek.co.in/
If I want to see my SSL enabled page every time I need to add https:// before above URL like -- https://fdrms.visiontek.co.in/
Upvotes: 1
Views: 6187
Reputation: 467
The behavior you are seeing is your browser's doing. When you type www.example.com, it translates that to http://www.example.com. How your WebServer is configured doesn't really affect what your browser does in this case. As others have mentioned, if you want, you can have your web server automatically redirect any requests to HTTP to HTTPS and thus use your SSL site.
URL Rewite is the best way to accomplish this, you can check out what the rule would looke like here: https://ruslany.net/2009/04/10-url-rewriting-tips-and-tricks/#redirect-https
Upvotes: 2
Reputation: 12759
Once the SSL certificate is installed, your site still remains accessible via a regular insecure HTTP connection. To connect secure url you need to manually enter https:// prefix. To force a secure connection on your website you need to set redirect rule which redirects http to https.
You could follow below steps to redirect site from http to https:
Download Url rewrite module manually or from web platform installer.https://www.iis.net/downloads/microsoft/url-rewrite
Open IIS manager window and select site from connection pane which you want to apply redirect rule.
In the “Match URL” section:
Select “Matches the Pattern” in the “Requested URL” drop-down menu
- Press “OK”
- In the “Action” section, select “Redirect” as the action type and specify the following for “Redirect URL”: https://{HTTP_HOST}{REQUEST_URI}
- Check the “Append query string” box.
- Select the Redirection Type.
- Click on “Apply” on the right side of the “Actions” menu.
You could also add this rule directly in web.config file withoud using UI module which mention above.
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Regards, Jalpa.
Upvotes: 6