How To Map Custom Domain To Azure Web App

Posted by Anuraj on Sunday, December 2, 2018 Reading time :1 minute

Azure

This post is about how To Map Custom Domain To Azure Web App. By default azure web app comes with a subdomain.azurewebsites.net. In this post I am explaining how to map a custom domain to an azure web app.

You can map domain or sub domain to an azure web app. If you’re mapping a domain, you need to modify your A NAME records and for subdomain’s you need to configure C NAME records.

  1. First you need to create azure web app. For configuring custom domain’s you need to choose D1 (Shared Infrastructure) or more, which supports Custom domains.

Azure Web App

  1. I created this web app with shared pricing plan. Once you created the web app, select custom domain option from the overview blade.

Custom domain configuration in Azure Web app

  1. Click on the Add HostName option, enter a Hostname and click on Validate button. This will show configuration details for the hostname. If it is domain, then it will show A NAME configuration, and if you’re entering a subdomain, it will show C NAME configuration details, since you didn’t configured it, it is showing Domain Ownership as error.

Custom domain configuration in Azure Web app

  1. You will get IP Address of your azure web app, you need to configure A NAME records and TXT records of your domain provider to azure web app. Here is the A NAME configuration.

A NAME record

  1. And next you need to configure TXT records. Here is the screenshot for the same.

TXT NAME record

You can check whether the DNS records updated or not using websites like https://www.whatsmydns.net, this app will help you to verify the A NAME and TXT records got updated or not. Depends on your domain name provider, it might take sometime. Once it is done, you need to click on the Validate button again. Then you will be able to see the domain ownership also changed to green.

Domain Ownership - Completed

  1. Next click on the Add Hostname button. This will display the domain name under Hostname Assigned to Site.

Custom domain - Updated

Now onwards if you browse the site, it will bring your azure web app. In this way you can configure custom domain to azure web app. In the next blog post I will explain how to enable SSL for azure web app with custom domain.

Happy Programming :)


Similar Posts


Did you like this article? Share it with your friends

Facebook Twitter Google+ LinkedIn Reddit StumbleUpon



Translate
Subscribe
BMC logoBuy me a coffee


Copyright © 2018 - Anuraj P. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Hosted with ❤ by GitHub