Implementing Custom domain to Azure App Service

Sign in to Azure

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

Navigate to the app in the Azure portal

From the left menu, select App Services, and then select the name of the app.

Access DNS records with domain provider

Map a CNAME record

Sign in to the website of your domain provider.

Find the page for managing DNS records. Every domain provider has its own DNS records interface, so consult the provider’s documentation. Look for areas of the site labeled Domain Name, DNS, or Name Server Management.

Often, you can find the DNS records page by viewing your account information, and then looking for a link such as My domains.

Go to that page and then look for a link that is named something like Zone file, DNS Records, or Advanced configuration.

Create the CNAME record

Create the CNAME record

Add a CNAME record to map a subdomain to the app’s default hostname (<app_name>.azurewebsites.net, where <app_name> is the name of your app).

After you add the CNAME, the DNS records page looks like the following example:

Enable the CNAME record mapping in Azure

In the left navigation of the app page in the Azure portal, select Custom domains.

In the Custom domains page of the app, add the fully qualified custom DNS name (http://www.abouconde.com) to the list.

Select the + icon next to Add hostname.

Type the fully qualified domain name that you added a CNAME record for, such as http://www.abouconde.com.

Select Validate.

The Add hostname page is shown.

Make sure that Hostname record type is set to CNAME (www.example.com or any subdomain).

Select Add hostname.

It might take some time for the new hostname to be reflected in the app’s Custom domains page. Try refreshing the browser to update the data.

Resolve 404 “Not Found”

If you receive an HTTP 404 (Not Found) error when browsing to the URL of your custom domain, verify that your domain resolves to your app’s IP address using WhatsmyDNS.net.

If not, it may be due to one of the following reasons:

  • The custom domain configured is missing an A record and/or a CNAME record.
  • The browser client has cached the old IP address of your domain. Clear the cache and test DNS resolution again. On a Windows machine, you clear the cache with ipconfig /flushdns.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s