Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add custom domain to Azure web app without validation

I am on a project that is re-platforming a site from a web server to an Azure PaaS web app, in addition the site will have all new content and in some cases new URLs. We have some redirects in place to handle the mapping of old URL's to new ones. I would like to test that these redirects work correctly on my new azure web app. Normally I would update my hosts file to point at the new server, add an IIS binding so the correct website picks it up and go from there. However I don't seem to be able to bind a new hostname ("custom domain") without verifying that I own the new host name. It will just be my internal DNS that I will be altering to re-route my requests. Does anyone know how to add a custom domain in the azure web apps without validating? This doesn't sound like a big ask to me.

Thanks

Will

like image 744
wdhough Avatar asked Nov 26 '22 02:11

wdhough


1 Answers

You can't do it without any verification, but you can do it without pointing traffic away from your existing site to your new site.

To verify you own the domain without redirecting traffic to it yet, create a DNS record called a TXT record with your domain registrar.

the "TXT host" should be

awverify.mysubdomain.mydomain.com

or

awverify.mydomain.com

The "value" should be

myapp.azurewebsites.net

just replace "mysubdomain" and "mydomain" and "myapp" with your specific info.

After you do this, the verification should succeed and you can add the custom hostname.

Here is more info about this: https://learn.microsoft.com/en-us/azure/app-service/manage-custom-dns-migrate-domain

like image 171
TxRegex Avatar answered Nov 28 '22 16:11

TxRegex