Azure Migrating Website Hostnames - azure

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.
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.

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.

Related

Azure CDN connect custom domain

I have static website on azure storage, it's connected to azure cdn to have https, and i have my custom domain folla.com.pl I want this domain to point to https://companywebsitecdn.azureedge.net/ which is address of my website on azure cdn. I chose custom domain on cdn configuration site, it asks me to make dns mapping to verify ownership, so i make CNAME cdnverify.folla.com.pl to cdnveriy.companywebsitecdn.azureedge.net and it get me to other window with custom doamin https config. And here's my problem, it get's stuck on second step
How I'm suppouse to configure another mapping to make it work, what i mean is to make folla.com.pl to point to https://companywebsitecdn.azureedge.net/ with https. I can't proivde what i already tried with my dns because it was a lot and i don't remember all of it. Also it's already second try and everytime after failure I have wait 8 hours for another try. Thanks in advance
This is my DNS config
When you try to add your custom domain folla.com.pl in the custom domains settings of Azure CDN endpoint. Before this step, you should have a CNAME record in the following format in the DNS zone.
When you turn on the custom domain https, you don't need to make a CNAME cdnverify.folla.com.pl to cdnveriy.companywebsitecdn.azureedge.net. Read here.
If that CNAME record still exists and does not contain the cdnverify
subdomain, the DigiCert CA uses it to automatically validate ownership
of your custom domain.
If the CNAME record entry contains the cdnverify subdomain, follow the rest of the instructions in this step.
DigiCert sends a verification email to the following email addresses. Verify that you can approve directly from one of the following addresses and read here.
admin#<your-domain-name.com>
administrator#<your-domain-name.com>
webmaster#<your-domain-name.com>
hostmaster#<your-domain-name.com>
postmaster#<your-domain-name.com>
Automatic validation typically takes a few hours. If you don’t see your domain validated in 24 hours, open a support ticket.

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
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
You can use either a CNAME record or an A record to map a custom DNS name to App Service.
We recommend that you use a CNAME for all custom DNS names except a root domain.
If you missed a step or made a typo somewhere earlier, you see a verification error at the bottom of the page.
If you will use A record, you can create a TXT record to map to the app's default hostname .azurewebsites.net. App Service uses this record only at configuration time, to verify that you own the custom domain. After your custom domain is validated and configured in App Service, you can delete this TXT record.
Reference: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain.

for Azure websites, do you need to keep the awverify DNS records?

I managed to get my custom subdomain name assigned to my Azure website, following this (very carefully):
link to azure custom domain name instructions
Is it necessary to keep the "awverify" DNS records after the custom domain names linkage has been established?
I deleted the awverify DNS record for the test subdomain, and was able to add another subdomain pointer to my azurewebsites test site.
Maybe I did not wait long enough. Does anyone else have any experience with this, to say one way or the other?
Not sure if I understand the issue you are running into... but the CNAME entry with the 'awverify' subdomain is used to "prove" to Azure that you own that domain when you are wiring up a custom domain name. Once that is established, you no longer need that.

404 Error in IP Address provided by Azure for A Record

I am using a Reserved (as of today called 'Standard') instance in Azure to host my website.
I have also set up my CNAME record from my domain provider to forward from www.{0}.com to the {0}.azurewebsites.net record, which works just fine.
The trouble I am having is with the A record. Currently
{0}.com gets a 404.
Under 'Manage Domains' in the Azure Management portal, it recommends setting up an A record to the supplied IP address (i assume the VIP of my deployment).
The problem is that IP returns a 404 when it is hit, so of course {0}.com gets one too.
Is there something I need to do on the Azure side to get the IP provided to direct to my website?
Along with the A name record did you add a CNAME for verification purpose as well, to point from awverify.www.{0}.com to awverify.{0}.azurewebsites.net ?

Azure CNAME / A record confusion

I've set up my first site on Azure. Let's call it 'mysite.org.uk'. I've uploaded the files to Azure as a shared Azure website. It's accessible at 'mysite.azurewebsites.net'. Now I want to test it out by pointing a live subdomain to it, so basically I want it to resolve with the URL 'cloud.mysite.org.uk'. I've read the documentation and it says that before I can add an A record to my domain to do this, I need to create a CNAME record. The instructions it gives are:
The DNS record for 'cloud.mysite.org.uk' that points to
'mysite.azurewebsites.net' could not be located. If you
want to configure an A record, you must first create a CNAME record
with your DNS provider for
'awverify.cloud.mysite.org.uk' that points to
'awverify.mysite.azurewebsites.net'. First allow the
resource record to propagate, and then create the A record.
Okay, so I've logged into the Plesk control panel of the current host (where the DNS is controlled) and added a CNAME record with 'host': awverify.www.mysite.org.uk. and 'value': awverify.mysite.azurewebsites.net. I did this more than 24 hours ago so it should have propagated by now, but when I try to add the domain in the Azure portal it still tells me there's no verification CNAME record. Similarly when I ping awverify.www.mysite.org.uk it doesn't resolve (surely it should if it's set up right, as it's a new record, so it shouldn't rely on DNS propagation time?).
To be on the safe side I've also created a CNAME with host: awverify.cloud.mysite.org.uk and value: awverify.mysite.azurewebsites.net and that too isn't working. In fact when I add these CNAME records Plesk tells me:
Unable to resolve the canonical name
awverify.mysite.azurewebsites.net.
Anyhow, I'm a little bit stuck. I thought I'd followed the documentation pretty closely but obviously something isn't right.
If anyone has any pointers I'd be most grateful.
Thanks
It must have been a propagation issue oddly, as 48 hours later it works when I add the domain to Azure.

Resources