Search code examples
securityssliiswindows-server-2016iis-10

Need to type https:// awlays after adding SSL certificate


I bought a SSL certificate from some company and i have installed it on my Windows 2016 server IIS 10.and it's bind like below image.

When i type https://example.com it works fine... BUT when i type just example.com then it goes to IIS default site. as well as when i type https://www.example.com it works fine but when i type just www.example.com then it goes to Default IIS site.

enter image description here

This means when i type https:// then it works fine... But normally users type example.com or www.example.com .. So how can i configure thisone for the above requirement ?


Solution

  • That's exactly what your current site bindings will lead to,

    https://docs.jexusmanager.com/tutorials/binding-diagnostics.html#background

    So my suggestions are,

    1. Add HTTP bindings back to this, so that http://example.com and http://www.example.com can be handled by this site, not the Default Web Site.
    2. Install URL Rewrite module and then add a rule or rules to redirect HTTP traffic to HTTPS. Tons of articles/posts all over the internet on that.