Added SSL certificate to website, everything runs fine except if someone types https://example.com

53 views Asked by At

I recently added a SSL certificate to my site. In my webconfig I added this code to force the https connection from anyway someone can type in a http connection

<httpRedirect enabled="false" destination="" exactDestination="false" childOnly="false" />
      <rewrite>
       <rules>
        <rule name="Redirect to HTTPS" stopProcessing="true">
         <match url="(.*)" />
         <conditions>

          <add input="{HTTPS}" pattern="^OFF$" />

         </conditions>

         <action type="Redirect" url="https://www.example.com/{R:1}" redirectType="Permanent" />
        </rule>
       </rules>
      </rewrite>

However there is a problem, if a user types in the URL https://example.com they will be hit with the message that their connection is not private and to leave my site. I have two questions about this. Is my certificate wrong and that's why my domain is not being accepted as https?

And is there a way i can force someone that goes to https://example.com to get redirected to https://www.example.com?

1

There are 1 answers

0
Jon On

Take a look at your site on this website https://www.sslshopper.com/ssl-checker.html#hostname= this might give you a better understanding as to what is part of SSL