Static website custom domain missing SSL

Dimitar Grozev 60 Reputation points
2024-05-13T12:47:53.35+00:00

Greetings,

I have a storage account with a static website deployed that sits behind a vnet and I am trying to add a custom domain name for it. I have added the CNAME record in my DNS zone, however whenever I try to open it I receive an error saying the certificate is only valid for the auto-generated static website domains of type *.web.z6.web.core.windows.net/. From what I read the cert should get generated automatically. If I use the auto-generated domain it resolve fine and opens the static site.

Here is a part of the error:

Error code: SSL_ERROR_BAD_CERT_DOMAIN

NET::ERR_CERT_COMMON_NAME_INVALID

 

Unable to communicate securely with peer: requested domain name does not match the server’s certificate. HTTP Strict Transport Security: false HTTP Public Key Pinning: false

Am I missing a step or something else along the way ?

Thanks,
Dimitar

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
607 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,493 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,206 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
786 questions
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 23,581 Reputation points Microsoft Employee
    2024-05-13T15:22:40.7566667+00:00

    @Dimitar Grozev

    Thank you for reaching out.

    I understand that you have a storage account with a static website that sits behind a vnet and you are trying to add a custom domain name for it.

    As documented here in order to custom domain with HTTPS enabled you have to use Azure Front Door (preferred) or Azure CDN.

    You can follow the documentation here if choose to use Azure Front Door which is the recommended service here.

    If I may, based on your statement above.

    From what I read the cert should get generated automatically.

    As documented here This holds true for Azure Static Web Apps but for static websites hosted on Azure Storage you need to use the method above to enable HTTPS.

    Please let me know if I have misunderstood your question and we will gladly continue with our discussion. Thank you!

    0 comments No comments

0 additional answers

Sort by: Most helpful