Can I use Microsoft DNS servers to configure Custom Domains?

Ryszard 0 Reputation points
2024-03-04T19:32:48.3533333+00:00

Hi, I have created an Azure static web app and I need to configure custom domains. However my domain supplier offers only simple translation domain name - dns server ip address. Can I use Microsoft DNS servers to configure my custom domain?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
902 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 17,886 Reputation points
    2024-03-05T17:30:42.1366667+00:00

    Hello @Ryszard the short answer is yes, you can definitely use Microsoft DNS servers to configure a custom domain for your Azure Static Web App, even if your domain supplier only offers a simple translation (domain name to DNS server IP address).

    Follow these steps to achieve this:

    • Purchase your custom domain: Go to your domain supplier and purchase a custom domain name.
    • Delegate your domain to Microsoft DNS:

    Log in to your domain supplier's control panel.

    Locate the domain name management section.

    Find the option to manage DNS records or nameservers.

    You'll need to update the nameservers for your domain to point to Microsoft DNS servers. These nameservers can be found in the Azure portal for your Static Web App resource.

    Go to the Azure portal and navigate to your Static Web App resource. Under the "Settings" section, select "Custom domains." Click on "Add" and choose the option "Custom domain on Azure DNS". Once you locate the nameserver configuration option, replace the existing nameservers with the provided Microsoft DNS server names. Typically, they will look something like ns1-AzureStaticSites-${region}.azurewebsites.net and ns2-AzureStaticSites-${region}.azurewebsites.net, where ${region} represents your Azure region (e.g., "eastus").

    • Verify the domain delegation:

    After updating the nameservers, it can take some time (usually up to 24 hours) for the changes to propagate throughout the internet. You can use a tool like MXToolbox: [invalid URL removed] to verify that your domain is now pointing to the Microsoft DNS servers.

    • Configure the custom domain in Azure:

    Once the domain delegation is verified, go back to your Static Web App in the Azure portal. Under "Custom domains," choose "Add" and select "Custom domain on other DNS." Enter your custom domain name in the "Enter domain" field and click "Next." Azure will guide you through configuring the CNAME record for your domain to point to your Static Web App resource.

    Having your domain and Static Web App configured within the same platform (Azure) simplifies management and eliminates the need to switch between different providers. When you use Microsoft DNS for your custom domain, Azure Static Web App can automatically manage SSL certificates for your domain, ensuring a secure connection for users.

    hope that helped. Please let us know if you have further questions.

    -Grace

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.