forked from joostdenijs/azure-content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mike Wasson
committed
Sep 4, 2014
1 parent
bbefd57
commit 50ae46c
Showing
4 changed files
with
104 additions
and
42 deletions.
There are no files selected for viewing
Binary file added
BIN
+8.62 KB
articles/media/web-sites-custom-domain-name/azurewebsites-subdomain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,131 @@ | ||
<properties title="Learn how to configure an Azure website to use a custom domain name" pageTitle="Configure a custom domain name for an Azure website" metaKeywords="Azure, Azure Web Sites, domain name" description="" services="web-sites" documentationCenter="" authors="larryfr, jroth" /> | ||
|
||
<tags ms.service="web-sites" ms.workload="web" ms.tgt_pltfrm="na" ms.devlang="na" ms.topic="article" ms.date="01/01/1900" ms.author="larryfr, jroth" /> | ||
<tags ms.service="web-sites" ms.workload="web" ms.tgt_pltfrm="na" ms.devlang="na" ms.topic="article" ms.date="01/01/1900" ms.author="larryfr, jroth, mwasson" /> | ||
|
||
#Configuring a custom domain name for an Azure Website | ||
|
||
<div class="dev-center-tutorial-selector sublanding"><a href="/en-us/documentation/articles/web-sites-custom-domain-name" title="Custom Domain" class="current">Custom Domain</a><a href="/en-us/documentation/articles/web-sites-godaddy-custom-domain-name" title="GoDaddy">GoDaddy</a><a href="/en-us/documentation/articles/web-sites-network-solutions-custom-domain-name" title="Network Solutions">Network Solutions</a><a href="/en-us/documentation/articles/web-sites-registerdotcom-custom-domain-name" title="Register.com">Register.com</a><a href="/en-us/documentation/articles/web-sites-enom-custom-domain-name" title="Enom">Enom</a><a href="/en-us/documentation/articles/web-sites-moniker-custom-domain-name" title="Moniker">Moniker</a><a href="/en-us/documentation/articles/web-sites-dotster-custom-domain-name" title="Dotster">Dotster</a><a href="/en-us/documentation/articles/web-sites-domaindiscover-custom-domain-name" title="DomainDiscover">DomainDiscover</a><a href="/en-us/documentation/articles/web-sites-directnic-custom-domain-name" title="Directnic">Directnic</a></div> | ||
<div class="dev-center-tutorial-subselector"><a href="/en-us/documentation/articles/web-sites-custom-domain-name/" title="Websites" class="current">Website</a> | <a href="/en-us/documentation/articles/web-sites-traffic-manager-custom-domain-name/" title="Website using Traffic Manager">Website using Traffic Manager</a></div> | ||
|
||
[WACOM.INCLUDE [intro](../includes/custom-dns-web-site-intro.md)] | ||
When you create a website, Azure assigns it to a subdomain of azurewebsites.net. For example, if you your website is named **contoso**, the URL is **contoso.azurewebsites.net**. Azure also assigns a virtual IP address. | ||
|
||
This article provides generic instructions for using a custom domain name with Azure Websites. Please check the tabs at the top of this article to see if your domain registrar is listed. If so, please select that tab for registrar specific steps. | ||
![contoso.azurewebsites.net subdomain][subdomain] | ||
|
||
For a production website, you probably want users to see a custom domain name. This article explains how to configure a custom domain with Azure Websites. (This article provides generic instructions for any domain registrar. The tabs at the top of this article link to some articles for specific registrars.) | ||
|
||
[WACOM.INCLUDE [introfooter](../includes/custom-dns-web-site-intro-notes.md)] | ||
|
||
In this article: | ||
|
||
- [Understanding DNS records](#understanding-records) | ||
- [Configure your web sites for basic, shared or standard mode](#bkmk_configsharedmode) | ||
- [Add a DNS record for your custom domain](#bkmk_configurecname) | ||
- [Enable the domain on your web site](#enabledomain) | ||
|
||
<h2><a name="understanding-records"></a>Understanding DNS records</h2> | ||
- [Overview] | ||
- [DNS record types] | ||
- [Find the virtual IP address] | ||
- [Create the DNS records] | ||
- [Create an “awverify” record (A records only)](#awverify) | ||
- [Enable the domain name on your website] | ||
|
||
|
||
## Overview | ||
|
||
Here are the general steps to configure a custom domain name: | ||
|
||
[WACOM.INCLUDE [understandingdns](../includes/custom-dns-web-site-understanding-dns-raw.md)] | ||
1. Reserve your domain name. This article does not cover that process. There are many domain registrars to choose from. When you sign up, their site will walk you through the process. | ||
1. Create DNS records that map the domain to your Azure website. | ||
1. Add the domain name inside the Azure Management Portal. | ||
|
||
<h2><a name="bkmk_configsharedmode"></a>Configure your websites for basic, shared or standard mode</h2> | ||
Within this basic outline, there are specific cases to consider: | ||
|
||
- Mapping your root domain. The root domain is the domain that you reserved with the domain registrar. For example, **contoso.com**. | ||
- Mapping a subdomain. For example, **blogs.contoso.com**. You can map different subdomains to different websites. | ||
- Mapping a wildcard. For example, ***.contoso.com**. A wildcard entry applies to all subdomains of your domain. | ||
|
||
[WACOM.INCLUDE [modes](../includes/custom-dns-web-site-modes.md)] | ||
|
||
<a name="bkmk_configurecname"></a><h2>Add a DNS record for your custom domain</h2> | ||
|
||
To associate your custom domain with an Azure Website, you must add a new entry in the DNS table for your custom domain by using tools provided by the domain registrar that you purchased your domain name from. Use the following steps to locate and use the DNS tools. | ||
## DNS record types | ||
|
||
The Domain Name System (DNS) uses data records to map domain names into IP addresses. There are several types of DNS records. For websites, you’ll create either an *A* record or a *CNAME* record. | ||
|
||
- An A **(Address)** record maps a domain name to an IP address. | ||
- A **CNAME (Canonical Name)** record maps a domain name to another domain name. DNS uses the second name to look up the address. The user still sees the first domain name in their browser. For example, you could map contoso.com to *<yoursite>*.azurewebsites.net. | ||
|
||
If the IP address changes, a CNAME entry is still valid, whereas an A record must be updated. However, some domain registrars do not allow CNAME records for the root domain or for wildcard domains. In that case, you must use an A record. | ||
|
||
> [WACOM.NOTE] The IP address may change if you delete and recreate your website, or change the website mode back to free. | ||
|
||
## Find the virtual IP address | ||
|
||
Skip this step if you are creating a CNAME record. To create an A record, you need the virtual IP address of your website. To get the IP address: | ||
|
||
1. In your browser, open the Azure Management Portal. | ||
2. In the **Websites** tab, click the name of your site and select **Dashboard**. | ||
3. Select **Manage Domains** from the bottom of the page. (If this option is disabled, make sure you are using Shared, Basic, or Standard mode. For more information see [How to scale websites](http://www.windowsazure.com/en-us/documentation/articles/web-sites-scale/).) | ||
|
||
![](../media/custom-dns-web-site/dncmntask-cname-6.png) | ||
|
||
1. Log on to your account at your domain registrar, and look for a page for managing DNS records. Look for links or areas of the site labeled as **Domain Name**, **DNS**, or **Name Server Management**. Often a link to this page can be found be viewing your account information, and then looking for a link such as **My domains**. | ||
4. The IP address is listed toward the bottom of the dialog. | ||
|
||
4. Once you have found the management page for your domain name, look for a link that allows you to edit the DNS records. This might be listed as a **Zone file**, **DNS Records**, or as an **Advanced** configuration link. | ||
![](media/web-sites-custom-domain-name/ipaddress.png) | ||
|
||
* The page will most likely have a few records already created, such as an entry associating '**@**' or '\*' with a 'domain parking' page. It may also contain records for common sub-domains such as **www**. | ||
* The page will mention **A records** and **CNAME records**, or provide a drop-down to select a record type. It may also mention other records such as **MX records**. In some cases, these will be called by other names such as **IP Address records** instead A records, or **Alias Records** instead of CNAME records. | ||
* The page will also have fields that allow you to **map** from a **Host name** or **Domain name** to an **IP Address** or other domain name. | ||
## Create the DNS records | ||
|
||
5. While the specifics of each registrar vary, in general you map *from* your custom domain name (such as **contoso.com**,) *to* the Azure Website domain name (**contoso.azurewebsites.net**) or the Azure Website virtual IP address. | ||
Log in to your domain registrar and use their tool to add an A record or CNAME record. Every registrar’s website is slightly different, but here are some general guidelines. | ||
|
||
* CNAME records will always map to the Azure Websites domain - **contoso.azurewebsites.net**. So you will be mapping *from* a domain such as **www** *to* your **<yourwebsitename>.azurewebsites.net** address. | ||
|
||
> [WACOM.NOTE] If you will be using an A record, you must also add a CNAME record that maps *from* **awverify** *to* **awverify.<yourwebsitename>.azurewebsites.net**. | ||
> | ||
> * To map the root domain, or create a wildcard mapping for sub-domains immediately off the root, map *from* **awverify** *to* **awverify.<yourwebsitename>.azurewebsites.net**. | ||
> | ||
> OR | ||
> | ||
> * To map a specific sub-domain, map *from* **awverify.<subdomainname>** *to* **awverify.<yourwebsitename>.azurewebsites.net**. For example, the verification CNAME record for the **mail.contoso.com** sub-domain would map from **awverify.mail** to **awverify.<yourwebsitename>.azurewebsites.net**. | ||
> | ||
> This CNAME record is used by Azure to validate that you own the domain described by the A record. | ||
1. Find the page for managing DNS records. Look for links or areas of the site labeled **Domain Name**, **DNS**, or **Name Server Management**. Often the link can be found be viewing your account information, and then looking for a link such as **My domains**. | ||
2. When you find the management page, look for a link that lets you add or edit DNS records. This might be listed as a **Zone file**, **DNS Records**, or as an **Advanced** configuration link. | ||
|
||
* A records will always map to the Azure Websites virtual IP address. So you are mapping *from* a domain such as **www** *to* the website's virtual IP address. | ||
|
||
> [WACOM.NOTE] To map a root domain (such as **contoso.com**,) to an Azure Website, you will often map from '**@**', or a blank entry to the virtual IP address. To create a wildcard mapping that maps all sub-domains to the virtual IP address, you will usually map from '*' to the virtual IP address. | ||
> | ||
> The specifics of mapping a root or wildcard vary between registrars. Consult the documentation provided by your registrar for more specific guidance. | ||
The page might list A records and CNAME records separately, or else provide a drop-down to select the record type. Also, it might use other names for the record types, such as **IP Address record** instead of A record, or **Alias Record** instead of CNAME record. Usually the registrar creates some records for you, so there may already be records for the root domain or common subdomains, such as **www**. | ||
|
||
6. Once you have finished adding or modifying DNS records at your registrar, save the changes. | ||
When you create or edit a record, the fields will let you map your domain name to an IP address (for A records) or another domain (for CNAME records). For a CNAME record, you will map *from* your custom domain *to* your azurewebsites.net subdomain. | ||
|
||
<h2><a name="enabledomain"></a>Enable the domain name on your website</h2> | ||
In many registrar tools, you will just type the subdomain portion of your domain, not the entire domain name. Also, many tools use ‘@’ to mean the root domain. For example: | ||
|
||
<table cellspacing="0" border="1"> | ||
<tr> | ||
<th>Host</th> | ||
<th>Record type</th> | ||
<th>IP Address or URL</th> | ||
</tr> | ||
<tr> | ||
<td>@</td> | ||
<td>A (address)</td> | ||
<td>127.0.0.1</td> | ||
</tr> | ||
<tr> | ||
<td>www</td> | ||
<td>CNAME (alias)</td> | ||
<td>contoso.azurewebsites.net</td> | ||
</tr> | ||
</table> | ||
|
||
Assuming the custom domain name is ‘contoso.com’, this would create the following records: | ||
|
||
- **contoso.com** mapped to 127.0.0.1. | ||
- **www.contoso.com** mapped to **contoso.azurewebsites.net**. | ||
|
||
|
||
<h2 id="awverify">Create an “awverify” record (A records only)</h2> | ||
|
||
If you create an A record, Azure websites also requires a special CNAME record, which is used to verify that you own the domain you are attempting to use. This CNAME record must have the following form. | ||
|
||
- *If the A record maps the root domain or a wildcard domain:* Create a CNAME record that maps from **awverify.<yourdomain>** to **awverify.<yourwebsitename>.azurewebsites.net**. For example, if the A record is for **contoso.com**, create a CNAME record for **awverify.contoso.com**. | ||
- *If the A record maps a specific subdomain:* Create a CNAME record that maps from **awverify.<subdomain>** to **awverify.<yourwebsitename>.azurewebsites.net**. For example, if the A record is for **blogs.contoso.com**, create a CNAME record for **awverify.blogs.contoso.com**. | ||
|
||
Visitors to your site will not see the awverify subdomain; it’s only for Azure to verify your domain. | ||
|
||
## Enable the domain name on your website | ||
|
||
[WACOM.INCLUDE [modes](../includes/custom-dns-web-site-enable-on-web-site.md)] | ||
|
||
|
||
<!-- Anchors. --> | ||
[Overview]: #overview | ||
[DNS record types]: #dns-record-types | ||
[Find the virtual IP address]: #find-the-virtual-ip-address | ||
[Create the DNS records]: #create-the-dns-records | ||
[Enable the domain name on your website]: #enable-the-domain-name-on-your-website | ||
|
||
<!-- Images --> | ||
[subdomain]: media/web-sites-custom-domain-name/azurewebsites-subdomain.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
> [WACOM.NOTE] **This article is for Azure Websites**; for Cloud Services, see <a href="/en-us/develop/net/common-tasks/custom-dns/">Configuring a Custom Domain Name in Azure</a>. | ||
|
||
> [WACOM.NOTE] **For instructions on using Traffic Manager to load balance traffic to websites**, use the selector at the top of this article to select the Traffic Manager specific steps. | ||
|
||
> [WACOM.NOTE] **Custom domain names cannot be used with Free websites**. You must configure your websites for Shared, Basic, or Standard mode, which may change how much you are billed for your subscription. See <a href=/en-us/pricing/details/web-sites/">Websites Pricing Details</a> for more information. | ||
> | ||
> **For instructions on using Traffic Manager to load balance traffic to websites**, use the selector at the top of this article to select the Traffic Manager specific steps. | ||
> | ||
> **Custom domain names cannot be used with Free websites**. You must configure your websites for Shared, Basic, or Standard mode, which may change how much you are billed for your subscription. See <a href=/en-us/pricing/details/web-sites/">Websites Pricing Details</a> for more information. |