The site currently has only HTTP bindings on port 80, so add a trusted certificate and an HTTPS binding on port 443, then redirect HTTP requests to HTTPS.
1. Obtain and install the certificate
Use a certificate whose name covers the address users will enter, preferably datos110.telecom.com.ar.
The certificate must:
- Be valid and unexpired.
- Cover the exact hostname used by clients.
- Be issued by a certificate authority trusted by every client.
For an internal website, this can be a certificate from your organization’s internal CA, provided its root certificate is trusted on all client computers. A self-signed certificate is suitable for testing, but browsers will continue displaying a warning unless that certificate is added to their trusted root store. ^1^
To import a certificate response in IIS:
- Open IIS Manager.
- Select the server node, such as LDRNE-WEB0.
- Open Server Certificates.
- In Actions, select Complete Certificate Request.
- Select the certificate file, enter a friendly name, and complete the wizard. ^2^
2. Add the HTTPS binding
- In IIS Manager → Sites, select datos110.
- In Actions, select Bindings…
- Select Add.
- Configure:
- Type:
https - IP address:
All Unassigned, unless the site has a dedicated IP - Port:
443 - Host name:
datos110.telecom.com.ar - SSL certificate: select the installed certificate
- Type:
- If several HTTPS websites share the same IP address and port 443, enable Require Server Name Indication.
- Select OK, and then Close. ^3^
If users must also browse to https://datos110, that name must be included in the certificate and should have its own HTTPS binding. Using the fully qualified name consistently is preferable.
Confirm that TCP port 443 is permitted between client computers and the IIS server.
3. Test HTTPS before enabling redirection
Open:
https://datos110.telecom.com.ar/
The site should load without a certificate warning. If it does not:
- Verify that the certificate is within its validity period.
- Verify that the requested hostname is covered by the certificate.
- Verify that clients trust the issuing CA.
- Return to datos110 → Bindings… → https → Edit and confirm that the intended certificate is selected.
Browsers normally warn if the certificate is expired, its name does not match the requested host, or its issuer is not trusted. ^1^
4. Redirect HTTP to HTTPS
Do this only after HTTPS works correctly. If the IIS URL Rewrite module is installed, add the following rule to the site’s web.config:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect HTTP to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect"
url="https://{HTTP_HOST}/{R:1}"
redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
This keeps the port 80 binding so that a request such as http://datos110.telecom.com.ar/ can receive a permanent redirect to HTTPS. ^4^
Back up the existing web.config before editing it. If the server does not have URL Rewrite installed, either install Microsoft URL Rewrite or use IIS’s HTTP Redirect feature with separate HTTP and HTTPS sites; separate sites avoid a redirect loop.
5. Optional: enable HSTS
After confirming HTTPS and redirection are reliable, HSTS tells compatible browsers to use HTTPS for future visits. IIS 10.0 version 1709 and later support HSTS natively at the site level; earlier versions require custom configuration. ^4^
Do not enable HSTS until the valid certificate and HTTPS path are stable, because browsers will then enforce HTTPS for the configured period.
References