...
- Open web.config
- Find <services>
- For each endpoint within each <service> do one of:
- For HTTPS access only: Edit “Http” in binding value to “Https”.
Ex: “basicHttpBinding” ➔ “basicHttpsBinding”; “mexHttpBinding” ➔ “mexHttpsBinding” - For both HTTP and HTTPS access: Add a copy all endpoints with “Http” in binding value and edit value to have Https.
Ex: Copy endpoint line and edit “basicHttpBinding” ➔ “basicHttpsBinding” – Use this if both HTTP and HTTPS will be used.
HTTP Redirect to HTTPS
Use the URL Rewrite
...
Redirect HTTP to module to change incoming HTTP URLs to be HTTPS.
Info |
---|
If HTTP is going to be blocked then this section can be skipped. What that means is that if HTTP is used the URL will be denied, not redirected to HTTPS. |
...
- Install the URL Rewrite Module for IIS: http://www.iis.net/downloads/microsoft/url-rewrite
- Require SSL must not be checked for either Default Web Site or for any application (ex: AdamsAdmin, AdamsWeb, AdamsBridge, etc) under that. You can check the SSL Settings for each to see that it isn’t.
- Create the URL rewrite rules for the Default Web Site
- In IIS Manager select the Default Web Site
- In the IIS section, open the URL Rewrite module
NOTE: If the URL Rewrite module does not appear as an option after installing it, try closing and reopening IIS Manager. - Click Add Rule(s)…
- Select Inbound rules > Blank rule
- Select OK
- Fill in the following information
- Name - HTTP to HTTPS Redirect
- Match URL
- Requested URL - Matches the Pattern
- Using - Regular Expressions
- Pattern - (.*)
- Ignore case - checked
- Conditions
- Logical grouping: Match All
- Click Add…
- Condition input - {HTTPS}
- Check if input string - Matches the Pattern
- Pattern - ^OFF$
- Ignore case - checked
- Click OK
- Action
- Action type: Redirect
- Redirect URL: https://{HTTP_HOST}{REQUEST_URI}
- Append query string: un-checked
- Redirect type: Permanent (301)
- Click Apply (in the upper hand corner)
- Click Back to Rules
- Restart the web application pool
Require SSL/TLS
Require SSL/TLS/HTTPS for all apps.
Info |
---|
Skip this section if incoming HTTP URLs will be redirected to HTTPS. Require SSL denies HTTP requests before they can be redirected. |
- IIS Manager
- Select Default Web Site
- Double click on IIS > SSL Settings
- Check the "Require SSL" box
- Leave Client certificates set to Ignore
- Select Apply in the Actions pane
- Click to select the Default Web Site
- Click Restart
Tip |
---|
Test to make sure that users can access the web site and applications using both http:// and https:// with http:// redirecting to https:// |
...