Secure JavaScript websites with custom domains and certificates

Learn how to create a web app on Azure and purchase an Azure Domain name secured with an TLS/SSL certificate. The same process works for both Azure Function apps and Azure App service (web apps).

If you want to bring your own domain name or SSL certificate, use these resources:

1. Get an Azure domain for App Service

You can purchase a domain name in the Azure portal, specifically for your Azure Web app, or you can bring your own domain.

The domain resource is a separate resource from the web app resource.

  1. In the Azure portal, use this link to begin creating a new domain.

  2. As part of the creation process, create a new resource group to contain all the resources for your secured and named web app.

  3. In the Domain Details, enter the domain name you want, such as cats-flying-dogs.com. You should have a few domain name choices with variations to try.

    A new creation page opens. Create a new **App Service domain**.

  4. Continue filling out the creation tabs for the service:

    Tab name Select
    Contact information Personal or corporate information about web site ownership.
    Hostname assignment Keep the default settings.
    Advanced Keep the default settings so your domain name renews next year and your contact information is kept private.
  5. When you are done, select Review + create at the bottom of the web site.

    The domain name is purchased for you and billed to your Azure subscription.

2. Create a new web app service

Create a new paid web resource using one of the following links. Do not create the resource using a free pricing tier. Create the resource in the resource group created in the previous section.

3. Configure domain for web app service

  1. In the Azure portal, for your new web app, select the Custom domains setting, then select + Add custom domain.

    Select the **Custom domains** setting, then select **+ Add custom domain**.

  2. In the right panel, enter the new domain name, such as cats-flying-dogs.com, then select Validate.

  3. Select the Add custom domain to connect the domain name to the app service's IP address.

    Select the **Add custom domain** to connect the domain name to the app service's IP address.