Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Migrating Website Hostnames

I am trying to set up a secondary azure website in a different subscription. When creating the Custom Hostname for the new site location, I am forced to validate the hostname. Azure complains that the hostname is registered against a different CNAME and prevents me from adding it. This is true, but I don't care, I want this to swap over from the old website to the new one when the DNS records propagate.

I the old IIS world, I'd have just added the hostname to two servers and when the dns pointed to the correct one, it worked.

Now in Azure it validates that the Azure Hostname I am pointing it to is correct and that the cname record already exists, it isn't 'valid' until I change the DNS. I have to disassociate the current cname, then add to my new site.

I'm sure the only issue here is the "validation", there is no reason why I can't have the name in two places, dns decides which it goes to, not the end point web site.

Image of add host that is validating

I'd like to be able to set this alias, whether valid or not, so that when it becomes valid, it works.

The result I get is validation prevent me adding the hostname. - I have to ask the client to change the DNS Record - when they manage to do that, they will tell me - only then I can go in to Azure and add the hostname to make my site work.

like image 542
Rod Avatar asked Mar 07 '23 09:03

Rod


1 Answers

There is documentation for this exact scenario: https://learn.microsoft.com/en-us/azure/app-service/app-service-custom-domain-name-migrate

You can create a TXT record with host:

awverify.register.tourofmargaretriver.com

and value:

cyclingeventuresregistration-production-webapp.azurewebsites.net

This verifies domain ownership without directing traffic to it.

like image 75
juunas Avatar answered Mar 24 '23 23:03

juunas