Direct 1and1 domain to Azure site

2.6k views Asked by At

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!

3

There are 3 answers

0
Alex Warren On

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.

0
Sam Kort On

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

  1. Go to 1and1 control panel > Domains > Edit DNS Settings.
  2. In Edit DNS Settings, the Name Server Settings should remain 1 & 1 name server.
  3. 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'.
  4. Add a TXT record with the value being yourappname.azurewebsites.net and click save.
  5. 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
  6. 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)'
  7. Expand the Sub Domain you created and click on 'Edit DNS Settings'.
  8. 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.
  9. 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

  1. Go to your app > Custom Domain > Add Hostname
  2. In hostname text box, type yourdomain.yourextension and click validate, on successful validation click 'Add Hostname'
  3. Repeat step 2 to add www.yourdomain.yourextension.

Hope this helps.

0
justadeveloper On

This is how I did it.

  1. In your 1and1 account create a subdomain for your domain awverify.yourdomain.com

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

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

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