When you create a web site, Windows Azure provides a friendly subdomain on the azurewebsites.net domain so your users can access your web site using a URL like http://<mysite>.azurewebsites.net. However, if you configure your web sites for Shared or Standard mode, you can map your web site to your own domain name.
The steps in this task require you to configure your web sites for Shared or Standard mode.
You can use a CNAME record to point your domain name to your Windows Azure web site. You can also configure an A record to point the domain name to Windows Azure web site. The process requires that you wait for the CNAME and A records propagate before you can finally set the domain name in the management portal.
There are two ways you can configure the Domain Name Server (DNS) settings on your domain registrar to point to your Windows Azure web site:
CNAME or Alias record
With a CNAME, you map a specific domain, such as www.contoso.com or myblog.contoso.com, to the <mysite>.azurewebsites.net domain name of your Windows Azure web site.
Using the Microsoft sample domain, contoso.com, as an example:
You can typically map subdomains such as www.contoso.com or MySubSite.contoso.com.
Typically you cannot map bare domains such as contoso.com or wildcard names such as *.contoso.com.
A record
With an A record, you map a domain (e.g., contoso.com or www.contoso.com) or a wildcard domain (e.g., *.contoso.com) to the single public IP address of a deployment within a Windows Azure web site.
The main benefit of this approach over using CNAMEs is that you can map root domains (e.g., contoso.com) and wildcard domains (e.g., *.contoso.com), in addition to subdomains (e.g., www.contoso.com).
Configure your web sites for shared mode
Setting a CNAME record is the recommend way to map your domain name to your Windows Azure web site. Mapping a CNAME record insulates your web site from changes that could affect the underlying IP address of the site.
1. In your browser, open the Management Portal.
2. In the Web Sites tab, click the name of your site.
3. Click the SCALE tab.
4. In the general section, set the web site mode by clicking SHARED
5. Click Save.
6. When prompted about the increase in cost for Shared mode (or for Standard mode if you choose Standard), click Yes if you agree.
Note
If you receive a "Configuring scale for web site 'web site name' failed" error, you can use the details button to get more information.
Configure the CNAME on your domain registrar
After the CNAME or A record for domain name has propagated, you must associate it with your web site.
7. Configure the domain name and the IP address you copied in step 5. For example, the following DNS example forwards all traffic from contoso.com to 172.16.48.1.
The steps in this task require you to configure your web sites for Shared or Standard mode.
You can use a CNAME record to point your domain name to your Windows Azure web site. You can also configure an A record to point the domain name to Windows Azure web site. The process requires that you wait for the CNAME and A records propagate before you can finally set the domain name in the management portal.
There are two ways you can configure the Domain Name Server (DNS) settings on your domain registrar to point to your Windows Azure web site:
CNAME or Alias record
With a CNAME, you map a specific domain, such as www.contoso.com or myblog.contoso.com, to the <mysite>.azurewebsites.net domain name of your Windows Azure web site.
Using the Microsoft sample domain, contoso.com, as an example:
You can typically map subdomains such as www.contoso.com or MySubSite.contoso.com.
Typically you cannot map bare domains such as contoso.com or wildcard names such as *.contoso.com.
A record
With an A record, you map a domain (e.g., contoso.com or www.contoso.com) or a wildcard domain (e.g., *.contoso.com) to the single public IP address of a deployment within a Windows Azure web site.
The main benefit of this approach over using CNAMEs is that you can map root domains (e.g., contoso.com) and wildcard domains (e.g., *.contoso.com), in addition to subdomains (e.g., www.contoso.com).
Configure your web sites for shared mode
Setting a CNAME record is the recommend way to map your domain name to your Windows Azure web site. Mapping a CNAME record insulates your web site from changes that could affect the underlying IP address of the site.
1. In your browser, open the Management Portal.
2. In the Web Sites tab, click the name of your site.
3. Click the SCALE tab.
4. In the general section, set the web site mode by clicking SHARED
5. Click Save.
6. When prompted about the increase in cost for Shared mode (or for Standard mode if you choose Standard), click Yes if you agree.
Note
If you receive a "Configuring scale for web site 'web site name' failed" error, you can use the details button to get more information.
Configure the CNAME on your domain registrar
To configure a custom domain name, you must create a CNAME record in your custom domain name's DNS table. Each registrar has a similar but slightly different method of specifying a CNAME record, but the concept is the same. Once you have configured the CNAME record, it will take some time to propagate.
- In your browser, open the Windows Azure Management Portal.
- In the Web Sites tab, locate the name of your site.
- Log on to your DNS registrar's web site, and go to the page for managing DNS. You might find this in a section, such as Domain Name, DNS, or Name Server Management.
- Now find the section for managing CNAMEs. You may have to go to an advanced settings page and look for the words CNAME, Alias, or Subdomains.
- Finally, you must provide a subdomain alias, such as www. Then, you must provide a hostname, which is your application's azurewebsites.net domain which consists of the name you located in step two and the azurewebsites.net domain. For example, using the Microsoft sample domain of contoso.com, the following CNAME record example forwards all traffic from www.contoso.com to mysite.azurewebsites.net, the DNS name of your deployed application:
| Alias | TTL | Type | Value |
|---|---|---|---|
| www.contoso.com | 86400 | CNAME | mysite.azurewebsites.net |
Set the domain name in management portal
After the CNAME or A record for domain name has propagated, you must associate it with your web site.
- In your browser, open the Windows Azure Management Portal.
- In the Web Sites tab, click the name of your site.
- Click the Dashboard tab.
- At the bottom of the screen, click Manage Domains.
5. In the DOMAIN NAMES text box, type the domain name that you have configured.
6. Click the check mark to accept the domain name.
Windows Azure validates the existence of the hostname in the public DNS before it save changes and updates the internal Windows Azure DNS. Windows Azure validates the hostname before committing the save. By waiting until the CNAME change propagates, Windows Azure can verify that the custom domain belongs to the site owner. Verification allows Windows Azure routing to set up the route for each hostname, and ensures that every hostname belongs to one and only one site.
Configure an A record for the domain name
To configure an A record, you must configure a CNAME record used to verify the domain name. This process is the same as the one used to configure a CNAME record to point to your web site, except that you configure the CNAME record domain names that will be used for verification purposes. For example, using the Microsoft sample domain contoso.com, the hostname will be awverify.www.contoso.com and the value will be awverify.mysite.azurewebsites.net. Once this has propagated, you can configure the A record.
- In your browser, open the Windows Azure Management Portal.
- In the Web Sites tab, click the name of your site.
- Click the Dashboard tab.
- At the bottom of the screen click Manage Domains.
5. On the Manage custom domains dialog, locate The IP Address to use when configuring A records.
Copy the IP address.
6. Log on to your DNS registrar's web site, and go to the page for managing DNS. You might find this in a section such as Domain Name, DNS, or Name Server Management.7. Configure the domain name and the IP address you copied in step 5. For example, the following DNS example forwards all traffic from contoso.com to 172.16.48.1.
| Alias | TTL | Type | Value |
|---|---|---|---|
| awverify.www.contoso.com | 86400 | CNAME | awverify.mysite.azurewebsites.net |
| contoso.com | 7200 | A | 172.16.48.1 |






No comments:
Post a Comment