Add a custom domain to an Azure Web App
How to add a custom domain to an Azure Web App, so your website uses your own domain name instead of the generic name app.azurewebsites.net
1. Create a Web App using Azure CLI
2. Deploy a .NET Web App to Azure using Visual Studio
3. Add a custom domain to an Azure Web App
4. Configure SSL for an Azure Web App using an App Managed Certificate
5. Configure SSL for an Azure Web App using Let's Encrypt
Add a custom domain
App Service
Custom domains - Add custom domain
Enter your domain name - Validate
Create external DNS records
You will need to create a CNAME record for www.planetexpress.live pointing to www-planetexpress-app.azurewebsites.net and add a DNS TXT record to prove you own the domain.
Copy the custom domain verification ID and CNAME
Create DNS CNAME record
Create DNS TXT record to verify domain ownership
Copy the TXT host value asuid.www
Create DNS TXT record
Wait for the DNS changes to propagate (this could take 20-30 mins) then click Validate (1)
DNS records created successfully (2)
Once the DNS records have updated you can click Add custom domain (3)
Browse to the website using the new domain www.planetexpress.live
You will need to create DNS records for both the www and non-www custom domains.
When finished, your DNS records should look something like this:
An A record for the Azure Web App IP address 51.137.163.32
TXT records to verify domain ownership for asuid and asuid.www
CNAME record for www pointing to www-planetexpress-app.azurewebsites.net
In the next guide we will use Let's Encrypt to get an SSL certificate for our website.
Comments