0

I`m trying to setup SSL certificate on site that using Microsoft Azure hosting, SSL from Azure and domain provided from superhosting.bg. Site using .NET MVC 5 and SQL Server for DB

In Azure environment I have SSL sertificate

azure ssl setup

In the web.confing file I have

  <system.webServer>
    <rewrite>
      <rules>
        <!-- BEGIN rule ELEMENT FOR HTTPS REDIRECT -->
        <rule name="Force HTTPS" enabled="true">
          <match url="(.*)" ignoreCase="false" />
          <conditions>
            <add input="{HTTPS}" pattern="off" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
        </rule>
        <!-- END rule ELEMENT FOR HTTPS REDIRECT -->
      </rules>
    </rewrite>
  </system.webServer>

My question is in the firm that provide me domain name what value I need to setup to work properly?

domain firm settings

Manglu
  • 10,744
  • 12
  • 44
  • 57
Dany
  • 367
  • 1
  • 2
  • 21

1 Answers1

0

After configured the IP based SSL, Azure Web App will create a new, dedicated IP address for your web app. Please open your web app's Custom domain page to get the latest IP address and remap it or your A record.

In addition, I found there is a extra '.' at the end of your CNAME record binding.

mebellete.azurewebsites.net.

Please change it to

mebellete.azurewebsites.net
Amor
  • 8,325
  • 2
  • 19
  • 21
  • mebellete.azurewebsites.net. this additional . comes from domain firm and it is not the problem. When change SSl to IP based the ip stay the same. Only the domain generate from azur site.azurewebsite.net go with ssl, and my custom domain still redirect from https to http – Dany Aug 16 '17 at 07:01
  • I got this error when access your custom domain through https. "The hostname in the website’s security certificate differs from the website you are trying to visit. ". Please double check the CN of your certificate. – Amor Aug 16 '17 at 07:08
  • In addition, only one IP-based SSL binding can be added to a web app. You could change the binding type to SNI-based SSL for other bindings. – Amor Aug 16 '17 at 07:12
  • Instead of "{HTTP_HOST}", can you try using "{SERVER_NAME}". – Mihir Aug 16 '17 at 07:58
  • 1
    Problem solved. I`m added explicit use WWW prefix every time and working fine – Dany Aug 17 '17 at 08:58
  • I am glad to hear that your issue is solved. Please mark helpful replies as answer or post a new reply with your solution. A thread which has been marked as answer will be easily searched. It will help others who encounter similar issues. – Amor Aug 17 '17 at 10:09