Both sites can work, but the second site needs its own HTTPS binding and (optionally) its own rewrite/redirect behavior.
Key points and steps:
- Configure HTTPS bindings for both sites
- In IIS Manager, for Site 1 (port 443):
- You already have an HTTPS binding on
recovery.domain.com:443with the new certificate.
- You already have an HTTPS binding on
- For Site 2 (port 10000):
- Decide how it should be accessed securely:
- Either keep it as
https://recovery.domain.com:10000(HTTPS on 10000), or - Move it to a standard HTTPS port (443) with a different host name or IP.
- Either keep it as
- If you want
https://recovery.domain.com:10000:- Add a new HTTPS binding to Site 2 with:
- Type:
https - IP: the server IP (or
All Unassigned) - Port:
10000 - Host name: usually blank when using a non‑standard port
- SSL certificate: select the same certificate (if it matches
recovery.domain.com).
- Type:
- Add a new HTTPS binding to Site 2 with:
- Decide how it should be accessed securely:
- Without this HTTPS binding on port 10000, HTTP.sys will not listen on 10000 for TLS and the site will be unreachable over HTTPS.
- In IIS Manager, for Site 1 (port 443):
- Ensure the HTTP (port 80) redirect does not capture traffic meant for port 10000
- URL Rewrite rules work per site and per request, based on the URL/headers, not on the IIS site name.
- If the redirect rule on Site 1 is too broad (for example, redirects all requests for
recovery.domain.comregardless of port), browsers may never reach Site 2. - Typical safe pattern:
- On Site 1 (port 80), have a rule that redirects
http://recovery.domain.com→https://recovery.domain.com(port 443). - On Site 2, either:
- No redirect rule at all, or
- A rule that redirects
http://recovery.domain.com:10000→https://recovery.domain.com:10000only.
- On Site 1 (port 80), have a rule that redirects
- Example of using URL Rewrite correctly
- URL Rewrite is designed to transform URLs and perform redirects based on rules. For example, a rule can:
- Redirect
http://recovery.domain.comtohttps://recovery.domain.com. - Rewrite friendly paths to internal ones (e.g.,
/article/342/title→/article.aspx?id=342&title=title).
- Redirect
- Ensure rules are scoped to the correct site and do not unintentionally affect the second site’s traffic.
- URL Rewrite is designed to transform URLs and perform redirects based on rules. For example, a rule can:
- Test the configuration
- After adding the HTTPS binding for Site 2 and adjusting rules:
- Restart IIS or recycle the sites.
- Test:
-
http://recovery.domain.com→ should redirect tohttps://recovery.domain.com(Site 1). -
https://recovery.domain.com:10000→ should load Site 2 over HTTPS. - If using HTTP on 10000, test
http://recovery.domain.com:10000and, if desired, configure a separate redirect tohttps://recovery.domain.com:10000in Site 2.
-
- After adding the HTTPS binding for Site 2 and adjusting rules:
If the second site still fails to load after adding the HTTPS binding on port 10000 and adjusting URL Rewrite rules, verify that the firewall allows port 10000 and that no other service is using that port.
References: