Azure SQL - Custom Domain

Sean Hogan 15 Reputation points
2023-03-07T16:15:04.3466667+00:00

I have a question about using a custom domain with Azure SQL.

Let's say we have an Azure SQL resource named sql-server-001.database.windows.net. I want to access this server with the custom domain sql-server-001.dev.mycompany.com. We can easily do this by creating a CNAME record i.e.:

sql-server-001.dev.mycompany.com. IN CNAME sql-server-001.database.windows.net.

This does technically work, however we run into an SSL issue that has to be resolved with TrustServerCertificate=True, which obviously isn't ideal in production environments.

So my question is this: Is there any current or planned support for custom DNS for Azure SQL? (Similar to Azure App Service, for example)

Azure SQL Database
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 16,076 Reputation points Microsoft Employee
    2023-03-07T17:05:50.9633333+00:00

    @Sean Hogan Thank you for reaching out.

    My understanding is that you are looking to connect to Azure SQL using your own domain name instead of server name which you were able to achieve using CNAME record however you are running into SSL issues.

    Is there any current or planned support for custom DNS for Azure SQL?

    Update CNAME record in the DNS server IF you are connecting through private endpoint.

    In https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-overview#dns-configuration, it says we can use private DNS zone or custom DNS server.

    • Use a private DNS zone. You can use private DNS zones to override the DNS resolution for a given private endpoint. A private DNS zone can be linked to your virtual network to resolve specific domains.
    • Use your custom DNS server. You can use your own DNS server to override the DNS resolution for a given private link resource. If your DNS server is hosted on a virtual network, you can create a DNS forwarding rule to use a private DNS zone to simplify the configuration for all private link resources.

    How to use different domain name to connect to Azure SQL DB Server

    Please let me know if that answer your question. If that not, please comment below so we can work on the same to assist you.

    Regards,

    Oury