How to point a domain to Azure

When you create a Cloud Service, Azure assigns it to a subdomain of cloudapp.net. For instance, if your Cloud Service is named "example", your users will be able to access your application on a URL like http://example.cloudapp.net. Azure also assigns a virtual IP address. Thus, it is possible to point your custom domain to Azure either via a CNAME record or an IP address.

If your domain is pointed to our our BasicDNS, BackupDNS (a legacy option), PremiumDNS or FreeDNS, you can easily configure it for the Azure Cloud Service via creating a CNAME record or an A record:



Using a CNAME record

Fir of all, you should get a CNAME value at Azure. Then you can proceed with making the needed settings in your Namecheap account:

- Sign in to your Namecheap account with your username and password to set the needed records.

- Select Domain List from the left sidebar and click on the Manage button next to your domain:


- Click on the Advanced DNS tab and find the Host records section (are you unable to edit host records?). Here, you will need to set up the following host records:

  • URL Redirect Record for @ to http://www.yourdomain.tld (should be substituted with the your actual domain)
  • CNAME record for www (pointing to your application's cloudapp.net domain, example.cloudapp.net, for instance).
- Once all details are inserted, save them using the Save all changes button:


It may take up to 30 minutes for the changes to take effect.

NOTE: If you want to direct traffic from non-existent subdomains, such as blog.yourdomain.tld or test.yourdomain.tld, to your cloudapp.net address, you can configure a Wildcard URL Redirect entry in your DNS settings.

The configuration will look as follows:

  • URL redirect Unmasked Record for @ to forward to http://www.yourdomain.tld
  • URL redirect Unmasked Record for * to forward to http://www.yourdomain.tld
  • CNAME record for www mapped to your application's cloudapp.net domain
Here is the example of such settings:



Once all the details are inserted, save them using the Save all changes button.

- Make sure that there are no conflicting records set for the same Host.

If there are any conflicting records, please remove them. You need to pay attention to the records of the following types: URL Redirect (Unmasked/Masked/Permanent Redirect), A or CNAME.

For example, you need to check if you have such records as URL redirect and CNAME set for the default Namecheap parking page:




Using an A record

If you wish to point the domain to Azure via an A record, you should get the IP address of your Cloud Service at Azure. Then, make the needed settings in your Namecheap account following these steps:

- Sign in to your Namecheap account with your username and password to set the needed records.

- Select Domain List from the left sidebar and click on the Manage button next to your domain:


- Click on the Advanced DNS tab and find the Host records section (are you unable to edit host records?). Here, you will need to set up 2 A records:

  • A Record for @ to mapped to the IP address of your cloud service
  • A Record for www mapped to the same IP address.
- Once all details are inserted, save them using the Save all changes button:



It may take up to 30 minutes for the changes to take effect.

This example demonstrates creating an A record for the root domain and www subdomain (www.yourdomain.tld). If you wish to create a wildcard entry to cover all non-existent subdomains, please enter "*" as the host name as shown below:

  • A Record for @ to forward to the IP address of your Cloud Service.
  • A Record for * mapped to the same IP address.
Here is the example:



Once all the details are inserted, save them using the Save all changes button.

Make sure that there are no conflicting records set for the same Host.

If there are any conflicting records, please remove them. You need to pay attention to the records of the following types: URL Redirect (Unmasked/Masked/Permanent Redirect), A or CNAME.

For example, you need to check if you have such records as URL redirect and CNAME set for the default Namecheap parking page:



That's it!

If you have any questions, feel free to contact our Support Team.

Comments

We welcome your comments, questions, corrections and additional information relating to this article. Your comments may take some time to appear. Please be aware that off-topic comments will be deleted.

If you need specific help with your account, feel free to contact our Support Team. Thank you.

Need help? We're always here for you.

× Close