Azure Websites DNS - azure

I have an azure website at yis3.azurewebsites.net - I have promoted this to be a "shared" site so that I can use a custom domain. I have the domain yorkshireimagescanning.co.uk that I bought from 123-reg.co.uk. I have configured this to give a CName record with dnsname of "awverify" and destination of awverify.yis3.azurewebsites.net.
I've waited over 12 hours and checked on digwebinterface.com and all looks good but when I click to "Manage custom domains" from the Azure portal , I enter a domain name of "yorkshireimagescanning.co.uk" but it won't accept it.
Please help
* Edit *
I've now waited a couple of days for domain propagation. Here's a screen grab from my domain registrar:
In the azure portal I've tried to add the following custom domains for the yis3.azurewebsites.net site but it won't accept any:
awverify.www.yorkshireimagescanning.co.uk
www.yorkshireimagescanning.co.uk yorkshireimagescanning.co.uk
awverify.yorkshireimagescanning.co.uk
Here's a screen grab from the portal:

To use yorkshireimagescanning.co.uk
To use your domain without the www. prefix you need to add an A Record in addition to the CNAME you've added for "awverify".
First, make sure you've added the domain to the Azure portal by following the instructions under "Set the domain name in management portal" here.
Next, follow the instructions under "Configure an A record for the domain name" on the same page. This involves pointing your domain directly at the IP address of the Azure web site. You should then have added 2 DNS records in total:
CNAME awverify.www awverify.yis3.azurewebsites.net
A xx.xx.xx.xx (your website's IP address)
I've marked the next option as "preferred" because it points your domain at the Azure hostname "yis3.azurewebsites.net" instead of directly at the IP address. The IP address of your Azure website won't change, but if you ever need to deploy your website elsewhere it will have a different IP, so there will be a delay while the DNS change propagates.
To use www.yorkshireimagescanning.co.uk (preferred)
To use your domain with a www. prefix you need to add another CNAME record in addition to the one you've already added.
First, make sure you've added the domain to the Azure portal by following the instructions under "Set the domain name in management portal" here.
Next, follow the instructions under "Configure the CNAME on your domain registrar" on the same page. This involves adding a CNAME that points "www" to your Azure website's hostname (yis3.azurewebsites.net). You should then have added 2 DNS records in total:
CNAME awverify.www awverify.yis3.azurewebsites.net
CNAME www yis3.azurewebsites.net
A note about domain forwarding: Don't use 301 forwarding unless your site has been permanently moved. Use 302 for temporary redirection. More details here.

I finally figured out what was wrong. I was deploying a new version of an existing site but the old version still had www.yorkshireimagescanning.co.uk set on the custom domains page. Once I deleted it then I was able to add the domain on the new azure site.

Related

Azure Web App naked URL redirects but www does not

I have a web app deployed on Azure and I'm trying to make it so both <myurl>.com and www.<myurl>.com work. Right now I have both domains listed on Azure within my webapp. www.<myurl>.com is registered as a CNAME from www to <myurl>.azurewebsites.net in godaddy. I have an A record from # to the IP address shown by Azure, as well as a TXT record from # to the given DNS by Azure <myurl>.azurewebsites.net
The problem is when I go to http://<myurl>.com it will change the URL to <myurl>.azurewebsites.net but when I go to http://www.<myurl>.com the URL is does not change.
Below are my go daddy DNS records. Most of these were there when I bought the domain so I'm not sure what they do. There is an A record that I can't seem to edit and I don't know what that IP address belongs to either.
Alot of this can be done with an A and a CNAME. You will need to add both "www" and "awverify.www" in your DNS, and do those corresponding entries in the Azure portal.
Here's good doc:
https://blogs.msdn.microsoft.com/kaushal/2013/07/05/azure-app-service-how-to-configure-a-custom-domain/
Here's alot more details:
https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain
The Azure portal will also give clues on what to do.

Direct 1and1 domain to Azure site

In the past I have been able to just change the nameservers, wait a short while and then create an addon domain on my hosting.
However this doesnt appear to be how Azure works. I keep reading I have to create a CNAME. 1and1 only allows CNAME's on subdomains. I have done this and I have xxx.mysite.org successfully pointed at mysite.azurewebsites.net.
Without using a HTTP redirect can I get mysite.org pointing at mysite.azurewebsites.net?
Thanks!
After days trying to tackle this and reading endless articles online, I finally found the solution. I found numerous articles on mapping and configuring custom domains with azure including getting Error 404 - Website not found after configuring azure (which I also faced) but lacked the detailed configuration with 1and1 which was the main issue.
Some of the top-level articles I've been through I've listed below.
Map Custom domain to Azure App
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-custom-domain-name
Configure custom domain to azure app
Configuring custom domain for Azure Web App
https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-custom-domain-name -- Refers to Cloud Service and/or Web App
Error 404 - Web Site not found - Azure web site
https://social.msdn.microsoft.com/Forums/azure/en-US/c7974e51-8022-47cb-9a8c-ff7643966dc3/error-404-web-site-not-found-azure-web-site?forum=windowsazurewebsitespreview
Solution
1and1 Domain Configuration
Go to 1and1 control panel > Domains > Edit DNS Settings.
In Edit DNS Settings, the Name Server Settings should remain 1 & 1 name server.
In A/AAAA and CNAME Records section, select 'Other IP Address' and enter the IP which is assigned to you azure web app, you can find this through accessing your web app and going to 'Custom Domains'.
Add a TXT record with the value being yourappname.azurewebsites.net and click save.
Create a sub domain in 1and1 portal called awverify.mydomain.extension (where extension is your domain extension .i.e .com/.net/.co.uk), click Save
After you create your sub domain, go back to the domain section and next to your domain name click on 'Manage Sub Domain (for that domain)'
Expand the Sub Domain you created and click on 'Edit DNS Settings'.
In the 'Edit DNS Settings' on the A/AAAA and CNAME Records section, select 'Other IP Address' and insert the same app IP Address in the IPv4 text box and click Save.
Go back to your Main 'Manage Domain' section in 1and1 and repeat steps 5, 6, 7 and 8 only this time, your sub domain should be www.yourdomain.yourextension and in step 8 the additional configuration is that you add a TXT record, the value of your TXT record should be yourappname.azurewebsites.net.
After you have finished with the 1and1 configuration, it is strongly advised to wait at least between 12-48 hours to allow the propagation to complete before trying to validate your app in azure, in some cases this might work after a couple of hours.
Then configure Azure to recognise your domain.
Azure Web App Configuration
Go to your app > Custom Domain > Add Hostname
In hostname text box, type yourdomain.yourextension and click validate, on successful validation click 'Add Hostname'
Repeat step 2 to add www.yourdomain.yourextension.
Hope this helps.
You don't have to use a CNAME to use a custom domain with your Azure website. You can use an A record instead.
When you go to "Manage custom domains" in the Azure portal for your site, at the bottom of the window (underneath the CNAME instructions and list of domains) is the IP address to use to configure the A record.
You can use this to configure the DNS for your bare domain, to point it to Azure.
This is how I did it.
In your 1and1 account create a subdomain for your domain awverify.yourdomain.com
Go to DNS settings of this subdomain and under the A/AAAA and CNAME Records section, there will be radiobox for the CNAME, select this option and type in awverify.yourdomain.azurewebsites.net (this could be found in the Bring External Domains window in your azure portal)
When you save your changes here, it might notify you an error, just wait for a few seconds or minutes then click save button again to save your changes.
After successfully saving the subdomain DNS settings, go to the DNS settings of your domain, now under A/AAAA and CNAME Records section, select Other IP Address and in the IPv4 Address text field, type in the IP address you will see under Bring External Domains in your Azure portal. Save your changes.
In your Azure portal, under Bring External Domains, type in your 1and1 domain, wait for to verify, you should see a green check mark at the right side of the text box.

Configuring Google Domain to point to Azure website

I have an site hosted on Azure that I am trying to point a domain from Google Domains to.
My current configuration is as follows:
Name Type Data
# A XXX.XXX.XXX.XXX
www CNAME history-podcasts.azurewebsites.net
awverify CNAME awverify.history-podcasts.com
I am following the instructions from here: Configuring a custom domain name for an Azure Website.
When I go to the Azure portal to Manage Domain and attempt to enter the url in DOMAIN NAMES, I get the following message:
A CNAME record pointing from history-podcasts.com to history-podcasts.azurewebsites.net was not found. Alternative record awverify.history-podcasts.com to awverify.history-podcasts.azurewebsites.net was not found either
When I go to the URL for the domain, I get the following message:
The website you have attempted to reach is not available in this Microsoft Azure Web Sites region. This could be due to one of several reasons:
The web site owner has registered a custom domain to point to the Microsoft Azure Web Site, but has not yet configured Azure to recognize it. Click here to read more.
When a site owner wants to use a custom domain with a Microsoft Azure Web Sites website, Azure needs to be configured to recognize the custom domain name, so that it can route the request to the appropriate server in the region. After registering the domain with a domain provider and configuring a DNS CNAME record to point to the site's Azurewebsites.net address (for example, contoso.azurewebsites.net), the website owner also needs to go to the Azure Portal and configure the site for the new domain. Click here to learn more about configuring the custom domains for a web site.
This is the same configuration settings I am currently using for several domains through Namecheap with Azure hosting and they work as intended.
EDIT:
To summarize, here are the steps you need to take:
1) Create CNAME record redirecting user from your domain to Azure specified domain using tools provided by your DNS hosting service
This step will ensure that when going to www.history-podcasts.com user will transparently be taken to history-podcasts.azurewebsites.net
Type: CNAME
Name: www
Value: history-podcasts.azurewebsites.net
IMPORTANT: Please note that it takes time for DNS servers to update their records therefore you should wait around 30 minutes before continuing.
2) Redirect your naked domain to subdomain using DNS hosting service tools
This step will ensure that when going to history-podcasts.com user will be redirected to www.history-podcasts.com
For Google Domains you can follow this guide here.
3) Add your domain to Azure Website
This step will assure Azure that you own the domain and you want your site to be reachable using specified domain name.
Login into https://manage.windowsazure.com/
Navigate Websites -> [Your Website] -> Configure
Scroll down to Domain names
Click Manage Domains (note that custom domains can only be used when in the Shared, Basic, or Standard modes)
Add your domain www.history-podcasts.com
At this point you should be able to reach your web site using both history-podcasts.com and www.history-podcasts.com domain names.
If your website requires HTTPS, you will have to take extra steps:
http://azure.microsoft.com/en-us/documentation/articles/web-sites-configure-ssl-certificate/

Azure custom domain name with NetworkSolutions DNS

I'm having trouble setting up my domain purchased from networksolutions.com to azurewebsites.net or cloudapp.net.
Here are some of the resources I'm using, so far with no success. The instructions are varied and I also suspect that network solutions does not allow for the correct settings.
Has any body set up successfully with network solutions?
Configure custom domain name
Custom DNS website
!!UPDATE!!
Thanks to the answer.. here are the CORRECT NetworkSolution DNS settings to get you plugged into azurewebsites.net
Azure settings...
You need to edit the DNS Zone file. Check this link and this link.
The exact steps to setup a Custom Domain is as follows
Go to DNS Zone file and add a CNAME for domains like www.example.com or mysite.example.com. Add a DNS Record ( C-Record ) - "www" : "mygreateazuresite.azurewebsites.net"
Then come to Azure portal, in the Custom Domain Option, put the complete URL [ www.example.com ]
The process to set up custom domain for both Azure Websites and Azure Cloud Services are very similar
I have Found a nice step by step tutorial (azure web app + network solutions), same steps but a bit more detailed (including a simple tool to check your domain settings):
http://loldemar.azurewebsites.net/custom-domain-name-in-azure-using-network-solutions/
Basic steps:
Go to azure web app, go to configure tab, and choose manage domains, from there copy the IP address that is bellow this message (Help for IP Address THE IP ADDRESS TO USE WHEN YOU CONFIGURE A RECORDS)
Go to network solutions (advanced DNS Settings) in your Add IPAddress on your IP Address A Records (#).
The go to cname records and add
awverify.yoursitenamehere.net 7200 awverify.yourazuresitename.azurewebsites.net.
awverify.www.yoursitenamehere.net 7200 awverify.yourazuresitename.azurewebsites.net.
www.yoursitenamehere.net 7200 yourazuresitename.azurewebsites.net.
Now go back to azure, click again manage domains, and add your domain names (yoursitename.net and www.yoursitename.net)

Hosting root domain (mydomain.com) with Windows Azure Shared Website?

I've been working on trying to get my own domain, for example mydomain.com, hosted in Azure Websites.
I upgraded/scaled to change my setting to "Shared".
I added CNAME record from www.mydomain.com to mydomain.azurewebsites.net.
I added www.mydomain.com to my website in azure under "Manage Domains", and it allowed me to add it successfully.
I am able to browse successfully to the website with www.mydomain.com.
I changed the A record for mydomain.com to point to the IP address listed under the Manage Domains section of the Azure website.
The CNAME and A record have propagated based on testing on my machine and on centralops.net DNS lookup tools.
If I browse to mydomain.com I get a 404. www.mydomain.com works as expected.
Can anyone help?
Step by step. This is working for me.
1 - In your DNS registrar create a CNAME record like following.
Name = awverify.mydomain.com
Value = awverify.mydomain.azurewebsites.net
TTL = 86400
2 - In Azure panel, add mydomain.com to your custom domains. It should show green check.
3 - Go back to your DNS registrar's web site and add an A Record for your custom domain using to IP provided to you by Microsoft in Azure Portal.
Name = mydomain.com
Value = 64.49.121.33
TTL = 7200
More info here.
I can think two options:
a) The Azure web server needs to be configured to browse your site with both www.mydomain.com and mydomain.com. Maybe you have configured only one in "Manage Domains"
b) mydomain.azurewebsites.net. resolves to a different IP than mydomain.com (the A Record you added in mydomain.com is wrong)
you need to work with a DNS provider that allows you to forward the A record to a DNS (Go Daddy provides this option) - i.e. www.mydomain.com points to mydomain.azurewebsites.net and mydomain.com is forwarded to www.mydomain.com

Resources