Are you migrating an existing site to Azure App Service and can't afford any downtime? If so, you'll need to take some pre-preemptive action to allow Azure App Service to recognize your custom domain(s) BEFORE your customer switches over their DNS.
By default, if you try to add your custom domain names to Azure App Service and they don't already point via an A or CNAME record to the Azure App Service then Azure will tell you it can't validate those hostnames.
Luckily, Azure has a way to bind the domain name preemptively using TXT records and is nicely explained in their knowledge base article Migrate an active DNS name to Azure App Service.
Want the short and sweet version?
Create a TXT domain verification record
To verify domain ownership, Add a TXT record. The TXT record maps from awverify.<subdomain> to <subdomain>.azurewebsites.net.
The TXT record you need depends on the DNS record you want to migrate.
Consider the following example:
Azure App Service Domain: my-website.azurewebsites.net
DNS record example |
TXT Host |
TXT Value |
my-website.com |
awverify |
my-website.azurewebsites.net |
www.my-website.com |
awverify.www |
my-website.azurewebsites.net |
*.my-website.com |
awverify.* |
my-website.azurewebsites.net |
This needs to be done for each domain.
Comments
Please sign in to leave a comment.