Custom Domains – PaaS Compute Options
Adding custom domain names to your application offers several advantages such as they are easy to remember, they offer branding, and they enable easier integration with other services. As you already know, if you create an app with the name myapp01, then your URL will become myapp01.azurewebsites.net. For production apps, most of the customers prefer to use a custom domain name rather than the default one.
When it comes to the configuration, the following are the steps you need to follow:
- Register your domain: If you haven’t already reserved your domain, the easiest way to get one is from the Azure portal. You must pay a fee for this purchase, though. In Figure 9.9, you can see that there is an option to buy App Service domains. Let’s say you already own a domain that you purchased from another domain registrar like Go Daddy; you can use that as well. The advantage of using App Service domains is that the DNS zones will be created in the Azure portal, and it will be easy for you to manage the records without the need to go to any third-party websites.
- Create DNS records: You can use an A or CNAME record to map the App Service to your domain. You can choose one of the available options and create a record. If you are choosing an A record, Azure will show you the IP address that needs to be mapped to the A record. In the case of CNAME, you can add a CNAME for the App Service URL (azurewebsites.net).
- Validation: Once the record is created, you need to run the validation to make sure that the record is in place. Be sure to test it.
Figure 9.9 shows how a custom domain is mapped to the Azure App Service. Depending on the hostname type that you are selecting, the portal will show you the records that need to be added to your DNS domain.

FIGURE 9.9 Mapping a custom domain to the app
Please note that the custom domain mapping is available only in paid tiers of App Service plans. If you are not able to add a custom domain to your app, it’s time to upgrade to one of the paid tiers.
So far, you have seen different features associated with App Services such as deployment slots, securing, and custom domains. Let’s cover one more feature, i.e., backup.