Skip to content

Commit b1d4216

Browse files
authored
Merge pull request #276721 from adrianhall/swa-dns-docbugs
[SWA] DNS Doc Bugs
2 parents 7bb551c + 97d19b9 commit b1d4216

File tree

4 files changed

+45
-84
lines changed

4 files changed

+45
-84
lines changed

articles/static-web-apps/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
- name: Use Azure DNS
7373
items:
7474
- name: Delegate your domain to Azure DNS
75-
href: azure-dns-zone.md
75+
href: /azure/dns/dns-delegate-domain-azure-dns
7676
- name: Set up a custom domain
7777
href: custom-domain-azure-dns.md
7878
- name: Set up the apex domain

articles/static-web-apps/azure-dns-zone.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,25 @@ The following procedure requires you to copy settings from an Azure DNS zone you
2727

2828
1. Select **DNS zones**.
2929

30-
2. Select **Create**.
30+
1. Select **Create**.
3131

32-
3. In the *Basics* tab, enter the following values.
32+
1. In the *Basics* tab, enter the following values.
3333

3434
| Property | Value |
3535
|---|---|
3636
| Subscription | Select your Azure subscription. |
3737
| Resource group | Select to create a resource group. |
3838
| Name | Enter the domain name for this zone. |
3939

40-
4. Select **Review + Create**.
40+
1. Select **Review + Create**.
4141

42-
5. Select **Create** and wait for the zone to provision.
42+
1. Select **Create** and wait for the zone to provision.
4343

44-
6. Select **Go to resource**.
44+
1. Select **Go to resource**.
4545

4646
With the DNS zone created, you now have access to Azure's DNS name servers for your application.
4747

48-
7. From the *Overview* window, copy the values for all four name servers listed as **Name server 1** to **Name server 4** and set them aside in a text editor for later use.
48+
1. From the *Overview* window, copy the values for all four name servers listed as **Name server 1** to **Name server 4** and set them aside in a text editor for later use.
4949

5050
## Update name server addresses
5151

articles/static-web-apps/custom-domain-azure-dns.md

Lines changed: 24 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -5,88 +5,53 @@ services: static-web-apps
55
author: craigshoemaker
66
ms.service: static-web-apps
77
ms.topic: how-to
8-
ms.date: 02/11/2021
8+
ms.date: 05/30/2024
99
ms.author: cshoe
1010
---
1111

1212
# Set up a custom domain with Azure DNS in Azure Static Web Apps
1313

14-
By default, Azure Static Web Apps provides an auto-generated domain name for your website, but you can point a custom domain to your site. Free SSL/TLS certificates are automatically created for the auto-generated domain name and any custom domains you may add.
14+
By default, Azure Static Web Apps provides an autogenerated domain name for your website, but you can point a custom domain to your site. Free SSL/TLS certificates are automatically created for the autogenerated domain name and any custom domains you may add.
1515

16-
This guide demonstrates how to configure your domain name with the `www` subdomain. Once this procedure is complete, you can set up an [apex domain](apex-domain-azure-dns.md).
16+
Suppose you buy the domain `example.com` from a domain name registrar and then create a zone with the name `example.com` in Azure DNS. You want `www.example.com` to point to your Static Web Apps site.
1717

18-
The following procedure requires you to copy settings from an Azure DNS zone you create and your existing static web app. Consider opening the Azure portal in two different windows to make it easier to switch between the two services.
18+
- If you're using an apex domain (a domain without a subdomain, also known as a root domain), see [configuring a custom apex domain with Azure DNS](apex-domain-azure-dns.md).
19+
- If you're using an external DNS provider, see [configuring a custom domain with external DNS](custom-domain-external.md) or [configuring a custom apex domain with external DNS](apex-domain-external.md).
1920

2021
## Prerequisites
2122

22-
- A custom domain
23-
- An existing Azure DNS zone
24-
- If you don't already have one, refer to [Delegate your domain to Azure DNS](azure-dns-zone.md)
23+
- A domain purchased from a domain name registrar and hosted on Azure DNS. For details, see [Delegate your domain to Azure DNS](/azure/dns/dns-delegate-domain-azure-dns).
2524

2625
## Map the domain to your website
2726

28-
Now that your domain is configured for Azure to manage the DNS, you can now link your DNS zone to your static web app.
27+
Now that your domain is hosted on Azure DNS, you can create a CNAME record for `www.<your domain>` to point to your Static Web App.
2928

30-
### Get static web app URL
29+
1. Sign in to the [Azure portal](https://portal.azure.com).
3130

32-
1. Open the [Azure portal](https://portal.azure.com).
31+
1. Enter the name of your Static Web App in the top search bar, or find the Static Web App in your resources.
3332

34-
1. Go to your static web app.
33+
1. Under **Settings**, select **Custom domains**.
3534

36-
1. From the *Overview* window, copy the generated **URL** of your site and set it aside in a text editor for future use.
35+
1. Select **+ Add**, then select **Custom domain on Azure DNS**.
3736

38-
### Create DNS records in Azure DNS
37+
1. Enter the following values in the *Add custom domain on Azure DNS* window.
3938

40-
1. Return to the DNS zone you created in the Azure portal.
39+
| Field name | Value |
40+
| --- | --- |
41+
| DNS zone | Select your domain name hosted on Azure DNS |
42+
| Subdomain | **www** |
4143

42-
2. Select **+ Record set**.
44+
The *Full domain* is updated and should match the desired custom domain name.
4345

44-
3. Enter the following values in the *Add record set* window.
46+
1. Select **Add**
4547

46-
| Setting | Property |
47-
|---|---|
48-
| Name | Enter **www** |
49-
| Type | Select **CNAME - Link your subdomain to another account** |
50-
| Alias record set | Select **No**. |
51-
| TTL | Keep default value. |
52-
| TTL unit | Keep default value. |
53-
| Alias | Paste in the Static Web Apps generated URL you set aside in a previous step. Make sure to remove the `https://` prefix from your URL. |
54-
55-
Additionally, you can select **Yes** for **Alias record set** and select your static web app instead of explicitly providing the URL to take advantage of alias record sets like [prevention from dangling DNS records](/azure/dns/dns-alias#prevent-dangling-dns-records).
48+
Static Web Apps makes the necessary adjustments to the DNS zone (including adding a CNAME), then validates the changes are available in the global DNS system.
5649

57-
4. Select **OK**.
50+
> [!WARNING]
51+
> If you receive the message *CNAME Record is invalid*, then check that your DNS zone lists the Microsoft DNS services with your DNS registrar. If you have recently moved the domain to Azure DNS, you may need to wait for DNS propagation before adding the custom domain.
5852
59-
### Configure static web app custom domain
53+
## Validate the custom domain
6054

61-
1. Return to your static web app in the portal.
55+
It may take some time for the DNS changes to propagate. The default time for Azure DNS is 1 hour.
6256

63-
1. Under *Settings*, select **Custom domains**.
64-
65-
2. Select **+ Add**.
66-
67-
3. In the *Subdomain* box, enter your subdomain name (*i.e.*, **www**). The **Full domain** field should then display the name of your custom domain, including subdomain.
68-
69-
> [!NOTE]
70-
> If you have delegated your domain to Azure DNS, and also elected to *Add custom domain on Azure DNS* when configuring your custom domain, you will have the option to select the *Azure DNS zone*. The following steps will then be performed automatically for you after you select **Add**.
71-
72-
4. Select **Next**.
73-
74-
5. In the *Validate + add* tab, enter the following values.
75-
76-
| Setting | Value |
77-
|---|---|
78-
| Domain name | This value should match the domain name you entered in the previous step (with the `www` subdomain). |
79-
| Hostname record type | Select **CNAME**. |
80-
81-
6. Select **Add**.
82-
83-
If you get an error saying that the action is invalid, wait 5 minutes and try again.
84-
85-
7. Open a new browser tab and go to your domain with the `www` subdomain.
86-
87-
After the DNS records are updated, you should see your static web app in the browser. Also, inspect the location to verify that your site is served securely using `https`.
88-
89-
## Next steps
90-
91-
> [!div class="nextstepaction"]
92-
> [Set up the apex domain in Azure DNS](apex-domain-azure-dns.md)
57+
Open a new browser and go to your domain (for example, `https://www.example.com`). Inspect the location to verify that your site is served securely using `https`.

articles/static-web-apps/custom-domain-external.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@ services: static-web-apps
55
author: craigshoemaker
66
ms.service: static-web-apps
77
ms.topic: how-to
8-
ms.date: 10/13/2022
8+
ms.date: 05/29/2024
99
ms.author: cshoe
1010
---
1111

1212
# Set up a custom domain in Azure Static Web Apps
1313

14-
By default, Azure Static Web Apps provides an auto-generated domain name for your website, but you can point a custom domain to your site. Free SSL/TLS certificates automatically get created for the auto-generated domain name and any custom domains that you might add. This article shows how to configure your domain name with the `www` subdomain, using an external provider.
14+
By default, Azure Static Web Apps provides an autogenerated domain name for your website, but you can point a custom domain to your site. Free SSL/TLS certificates automatically get created for the autogenerated domain name and any custom domains that you might add. This article shows how to configure your domain name with the `www` subdomain, using an external provider.
1515

16-
> [!NOTE]
17-
> Static Web Apps doesn't support set-up of a custom domain with a private DNS server, hosted on-premises. Consider using an [Azure Private DNS zone](../dns/private-dns-privatednszone.md).
18-
## Prerequisites
16+
There are multiple methods of configuring a custom domain for use with Static Web Apps:
1917

20-
- Consider how you want to support your apex domain. Domain names without a subdomain are known as apex root domains. For example, the domain `www.example.com` is the `www` subdomain joined with the `example.com` apex domain.
21-
22-
- You create an apex domain by configuring an `ALIAS` or `ANAME` record or flattening `CNAME`. Some domain registrars, like GoDaddy and Google, don't support these DNS records. If your domain registrar doesn't support all the DNS records you need, consider using [Azure DNS to configure your domain](custom-domain-azure-dns.md).
18+
- If you're using an apex domain (a domain without a subdomain, also known as a root domain), see [configuring a custom apex domain on Static Web Apps](apex-domain-external.md).
19+
- If you're using Azure DNS, see [configuring a custom domain with Azure DNS](custom-domain-azure-dns.md) or [configuring a custom apex domain with Azure DNS](apex-domain-azure-dns.md).
2320

2421
> [!NOTE]
25-
> If your domain registrar doesn't support specialized DNS records and you don't want to use Azure DNS, you can forward your apex domain to the `www` subdomain. For more information, see [Set up an apex domain in Azure Static Web Apps](apex-domain-external.md).
22+
> Static Web Apps doesn't support set-up of a custom domain with a private DNS server, hosted on-premises. Consider using an [Azure Private DNS zone](../dns/private-dns-privatednszone.md).
23+
24+
## Prerequisites
25+
26+
- You must be able to create a **CNAME** record on your DNS domain using the tools that your DNS service or domain registrar provides.
2627

2728
## Watch the video
2829

@@ -38,7 +39,7 @@ By default, Azure Static Web Apps provides an auto-generated domain name for you
3839

3940
## Create a CNAME record on your domain registrar account
4041

41-
Domain registrars are the services you can use to purchase and manage domain names. Common providers include GoDaddy, Namecheap, Google, Tucows, and the like.
42+
Domain registrars are services you can use to purchase and manage domain names. To find a domain registrar, see the [ICANN list of accredited registrars](https://www.icann.org/en/accredited-registrars).
4243

4344
1. Open a new browser tab and sign in to your domain registrar account.
4445

@@ -66,7 +67,7 @@ Domain registrars are the services you can use to purchase and manage domain nam
6667
For instance, if your domain name is `example.com`, enter `www.example.com`.
6768
:::image type="content" source="media/custom-domain/add-domain.png" alt-text="Screenshot showing sequence of steps in add custom domain form.":::
6869

69-
1. In the *Validate + Configure* tab, enter the following values.
70+
1. In the *Validate + add* tab, enter the following values.
7071

7172
| Setting | Value |
7273
|---|---|
@@ -75,13 +76,8 @@ Domain registrars are the services you can use to purchase and manage domain nam
7576

7677
1. Select **Add**.
7778

78-
Azure creates your `CNAME` record and updates the DNS settings. Since DNS settings need to propagate, this process can take up to an hour or longer to complete.
79+
Azure validates that the CNAME record was created correctly and is available in the global DNS system. Propagation depends on the time to live (TTL) for your domain and may take several days. If the validation fails, return to add the custom domain later.
7980

8081
1. When the update completes, open a new browser tab and go to your domain with the `www` subdomain.
8182

82-
You should see your static web app in the browser. Also, inspect the location to verify that your site is served securely using `https`.
83-
84-
## Next steps
85-
86-
> [!div class="nextstepaction"]
87-
> [Set up the apex domain](apex-domain-external.md)
83+
You should see your static web app in the browser. Inspect the location to verify that your site is served securely using `https`.

0 commit comments

Comments
 (0)