Monday, October 3, 2016

Configuring a custom domain for a website

Azure Websites are assigned to the azurewebsites.net domain. So, if your site name is contosoweb,then it is reachable at the URL contoso-web.azurewebsites.net. During development and testing this may be acceptable. However, as you approach the release of your website, you will generally want to configure a custom domain for the site, such as contoso.com.

Configuring a custom domain name requires the following steps:

1. Obtain a custom domain from a domain registrar of your choice.
2. Add DNS records for your domain using your domain registrar.
3. Associate the custom domain with your Azure website.

Adding DNS records

The DNS records you add with your domain registrar can be either an A record or CNAME record. An A record resolves a domain to a speciic IP address. For Azure Websites, that IP address is the IP address of the cluster of servers your website is running in. It is not the IP address of a speciic virtual machine. You can obtain the IP address you should use for your A record from the management portal by clicking the Domains and SSL part in the Website blade for your site. This will open the SSL Settings blade for your Site, as shown in Figure






















If you use an A record, then Azure requires that you first add a CNAME record to verify that you own the domain. This CNAME must be formatted as awverify..com and map to awverify..azurewebsites.net. below Table  illustrates how the A record and CNAME record are deined for the custom domain contoso.com.


NOTE :: The awverify CNAME record is only used when using an A record to conigure a custom
domain.

If you use CNAME records, then your DNS records only indicate the custom domain and the Azure website URL it maps to. It is also possible to map subdomains. Below Table shows an example of how a CNAME record is defined for a custom domain contoso.com.

Featured Posts

Adding Accesspolicy to KeyVault for Service Principal Using Portal and Powershell

  Scripts path : https://drive.google.com/drive/folders/1sbBpnVFgXhUIXLdf2E9heyWDeU2f9427?usp=sharing  Adding Accesspolicy to KeyVault for S...