Buy a custom domain name for Azure App Service

App Service domains are custom domains that are managed directly in Azure. They make it easy to manage custom domains for Azure App Service. This tutorial shows you how to buy an App Service domain and assign DNS names to Azure App Service.

For Azure VM or Azure Storage, see Assign App Service domain to Azure VM or Azure Storage. For Cloud Services, see Configuring a custom domain name for an Azure cloud service.


To complete this tutorial:

Buy an App Service domain

For pricing information on App Service domains, visit the App Service Pricing page and scroll down to App Service Domain.

  1. Open the Azure portal and sign in with your Azure account.

  2. In the search bar, search for and select App Service Domains.

    Portal navigation to Azure App Service domains

  3. In the App Service Domains view, click Add.

    Click Add in App Service domains

  4. Select Click to try the newer version of the App Service Domains create experience.

    Create App Service domain with new experience

Basics tab

  1. In the Basics tab, configure the settings using the following table:

    Setting Description
    Subscription The subscription to use to buy the domain.
    Resource Group The resource group to put the domain in. For example, the resource group your app is in.
    Domain Type the domain you want. For example, If the domain you want is not available, you can select from a list of suggestions of available domains, or try a different domain.


    The following top-level domains are supported by App Service domains: com, net,, org, nl, in, biz,, and

  2. When finished, click Next: Contact information.

Contact information tab

  1. Supply your information as required by ICANN for the domain registration.

    It is important that you fill out all required fields with as much accuracy as possible. Incorrect data for contact information can result in failure to buy the domain.

  2. When finished, click Next: Advanced.

Advanced tab

  1. In the Advanced tab, configure the optional settings:

    Setting Description
    Auto renewal Enabled by default. Your App Service domain is registered to you at one-year increments. Auto renewal makes sure that your domain registration doesn't expire and that you retain ownership of the domain. Your Azure subscription is automatically charged the yearly domain registration fee at the time of renewal. To opt out, select Disable. If auto-renewal is disabled, you can renew it manually.
    Privacy protection Enabled by default. Privacy protection hides your domain registration contact information from the WHOIS database. Privacy protection is already included in the yearly domain registration fee. To opt out, select Disable.
  2. When finished, click Next: Tags.


  1. In the Tags tab, set the tags you want for your App Service domain. Tagging is not required for using App Service domains, but is a feature in Azure that helps you manage your resources.

  2. Click Next: Review + create.

  3. In the Review + create tab, review your domain order. When finished, click Create.


    App Service Domains use GoDaddy for domain registration and Azure DNS to host the domains. In addition to the yearly domain registration fee, usage charges for Azure DNS apply. For information, see Azure DNS Pricing.

  4. When the domain registration is complete, you see a Go to resource button. Select it to see it's management page.

    App Service domain created. Go to resource

You're now ready to assign an App Service app to this custom domain.


Depending on the subscription type, a sufficient payment history may be required prior to creating an App Service Domain.

If you have made payments and are still running into this error, you can contact support and provide proof of payments.

Prepare the app

To map a custom DNS name to a web app, the web app's App Service plan must be a paid tier (Shared, Basic, Standard, Premium, or Consumption for Azure Functions). In this step, you make sure that the App Service app is in the supported pricing tier.


App Service Free and Shared (preview) service plans are base tiers that run on the same Azure virtual machines as other App Service apps. Some apps might belong to other customers. These tiers are intended to be used only for development and testing purposes.

  1. From the top search bar, search for and select App Services.

    Search for App Services

  2. Select the name of the app.

    Portal navigation to Azure app

    You see the management page of the App Service app.

Check the pricing tier

  1. In the left navigation of the app page, scroll to the Settings section and select Scale up (App Service plan).

    Scale-up menu

  2. The app's current tier is highlighted by a blue border. Check to make sure that the app is not in the F1 tier. Custom DNS is not supported in the F1 tier.

    Screenshot of the left navigation menu of the app page with Scale up (App Service plan) selected.

  3. If the App Service plan is not in the F1 tier, close the Scale up page and skip to Buy the domain.

Scale up the App Service plan

  1. Select any of the non-free tiers (D1, B1, B2, B3, or any tier in the Production category). For additional options, click See additional options.

  2. Click Apply.

    Screenshot of the custom domain pricing tiers in the Production category with the Production tab, B1 plan, and the Apply button highlighted.

    When you see the following notification, the scale operation is complete.

    Scale operation confirmation

Map App Service domain to your app

It's easy to map a hostname in your App Service domain to an App Service app, as long as it's in the same subscription. You map the App Service domain or any of its subdomain directly in your app, and Azure creates the necessary DNS records for you.


If the domain and the app are in different subscriptions, you map the App Service domain to the app just like mapping an externally purchased domain. In this case, Azure DNS is the external domain provider, and you need to add the required DNS records manually.

Map the domain

  1. In the left navigation of the app page, scroll to the Settings section and select Custom domains.

    Screenshot that shows the Custom domains menu.

  2. Select Add custom domain.

    Screenshot that shows the Add host name item.

  3. Type the App Service domain (such as or a subdomain (such as and click Validate.


    If you made a typo in the App Service domain name, a verification error appears at the bottom of the page to tell you that you're missing some DNS records. You don't need to add these records manually for an App Service domain. Just make sure that you type the domain name correctly and click Validate again.

    Screenshot that shows a verification error.

  4. Accept the Hostname record type and click Add custom domain.

    Screenshot that shows the Add custom domain button.

  5. It might take some time for the new custom domain to be reflected in the app's Custom Domains page. Refresh the browser to update the data.

    Screenshot that shows adding the CNAME record.


    A Not Secure label for your custom domain means that it's not yet bound to a TLS/SSL certificate. Any HTTPS request from a browser to your custom domain will receive an error or warning, depending on the browser. To add a TLS binding, see Secure a custom DNS name with a TLS/SSL binding in Azure App Service.

Test the custom domain

To test the custom domain, navigate to it in the browser.

Renew the domain

The App Service domain you bought is valid for one year from the time of purchase. You can configure to renew your domain automatically which will charge your payment method when your domain renews the following year. You can also manually renew your domain name.

If you want to configure automatic renewal, or if you want to manually renew your domain, follow the steps here.

  1. In the search bar, search for and select App Service Domains.

    Portal navigation to Azure App Service domains

  2. In the App Service Domains section, select the domain you want to configure.

  3. From the left navigation of the domain, select Domain renewal. To start renewing your domain automatically, select On, otherwise select Off. The setting takes effect immediately. If automatic renewal is enabled, on the day after your domain expiration date, Azure attempts to bill you for the domain name renewal.

    Screenshot that shows the option to automatically renew your domain.


    When navigating away from the page, disregard the "Your unsaved edits will be discarded" error by clicking OK.

To manually renew your domain, select Renew domain. However, this button is not active until 90 days before the domain's expiration date.

If your domain renewal is successful, you receive an email notification within 24 hours.

Manage custom DNS records

In Azure, DNS records for an App Service Domain are managed using Azure DNS. You can add, remove, and update DNS records, just like for an externally purchased domain. To manage custom DNS records:

  1. In the search bar, search for and select App Service Domains.

    Portal navigation to Azure App Service domains

  2. In the App Service Domains section, select the domain you want to configure.

  3. From the Overview page, select Manage DNS records.

    Screenshot that shows where to access the DNS records.

For information on how to edit DNS records, see How to manage DNS Zones in the Azure portal.

Cancel purchase (delete domain)

After you purchase the App Service Domain, you have five days to cancel your purchase for a full refund. After five days, you can delete the App Service Domain, but cannot receive a refund.

  1. In the search bar, search for and select App Service Domains.

    Portal navigation to Azure App Service domains

  2. In the App Service Domains section, select the domain you want to configure.

  3. In the domain's left navigation, select Locks.

    A delete lock has been created for your domain. As long as a delete lock exists, you can't delete the App Service domain.

  4. Click Delete to remove the lock.

  5. In the domain's left navigation, select Overview.

  6. If the cancellation period on the purchased domain has not elapsed, select Cancel purchase. Otherwise, you see a Delete button instead. To delete the domain without a refund, select Delete.

    Screenshot that shows where to delete or cancel a purchased domain.

  7. Confirm the operation by selecting Yes.

    After the operation is complete, the domain is released from your subscription and available for anyone to purchase again.

Direct default URL to a custom directory

By default, App Service directs web requests to the root directory of your app code. To direct them to a subdirectory, such as public, see Redirect to a custom directory.

Next steps

Learn how to bind a custom TLS/SSL certificate to App Service.