Skip to content

Commit 5ae0ef6

Browse files
[DNS] Step-by-step instructions to DNS records how-to (#17697)
* Add Tabs and fill in Dash and API steps for create-zone-apex * Create dns-record-steps partial and apply to create-subdomain-record * Replace repeated text in create-zone-apex by new partial * Specify product to fix render of api-field-definitions in LP * Clarify subdomain examples adding www and leverage GlossaryTooltip * Consistently indicate FQDN as CNAME target and remove mention to hostname * Reword to be more generic
1 parent b1bba94 commit 5ae0ef6

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed

src/content/docs/dns/manage-dns-records/how-to/create-zone-apex.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ sidebar:
66

77
---
88

9-
import { Example } from "~/components"
9+
import { Example, Render } from "~/components"
1010

1111
When you add a domain to Cloudflare, you may also need to create a DNS record on your zone apex (`example.com`).
1212

13-
To do this, create a corresponding [`A`, `AAAA`, or `CNAME` record](/dns/manage-dns-records/how-to/create-dns-records/) using `@` for the **Name**.
13+
To do this, create an [IP address resolution record](/dns/manage-dns-records/reference/dns-record-types/#ip-address-resolution) (`A`, `AAAA`, or `CNAME`) using `@` for the **Name**, as in the following example.
1414

1515
<Example>
1616

@@ -20,6 +20,11 @@ To do this, create a corresponding [`A`, `AAAA`, or `CNAME` record](/dns/manage-
2020

2121
</Example>
2222

23+
<Render file="dns-record-steps" product="dns" params={{
24+
name: "your zone apex",
25+
example: "@"
26+
}} />
27+
2328
## Domain redirects
2429

2530
Once you create a domain, you may want to route that traffic to other places.

src/content/partials/dns/create-subdomain-record.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,26 @@
33

44
---
55

6-
import { Example } from "~/components"
6+
import { Example, Render } from "~/components";
77

88
Most subdomains serve a specific purpose within the overall context of your website. For example, `blog.example.com` might be your blog, `support.example.com` could be your customer help portal, and `store.example.com` would be your e-commerce site.
99

1010
## Subdomain records
1111

12-
To create a new subdomain, you would first add the subdomain content at your host.
12+
To create a new subdomain, you would first add the subdomain content at your [host](/fundamentals/setup/manage-domains/#host-your-domain).
1313

14-
Then, you would create a corresponding [`A`, `AAAA`, or `CNAME` record](/dns/manage-dns-records/how-to/create-dns-records/) for that subdomain (`blog`, `store`).
14+
Then, you would create a corresponding [IP address resolution record](/dns/manage-dns-records/reference/dns-record-types/#ip-address-resolution) (`A`, `AAAA`, or `CNAME`), specifying the subdomain (`blog`, `www`, or `store`, for example) as the record **Name**.
1515

1616
<Example>
1717

1818
| Type | Name | IPv4 address | Proxy status |
1919
| ---- | ----- | ------------ | ------------ |
20-
| A | `www` | `192.0.2.1` | Proxied |
20+
| A | `blog` | `192.0.2.1` | Proxied |
2121

2222
</Example>
23+
24+
25+
<Render file="dns-record-steps" product="dns" params={{
26+
name: "your subdomain",
27+
example: "blog"
28+
}} />
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
params:
3+
- name
4+
- example
5+
---
6+
7+
import { Tabs, TabItem, Render, GlossaryTooltip } from "~/components";
8+
9+
<Tabs syncKey="dashPlusAPI">
10+
<TabItem label="Dashboard">
11+
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and zone.
12+
2. Go to **DNS** > **Records** and select **Add record**.
13+
3. Select `A`, `AAAA`, or `CNAME` as the record **Type**, according to your needs:
14+
- To point to an IPv4 address, select `A`, use {props.name} (<code>{props.example}</code>) for the record **Name**, and insert the IPv4 address in the respective field.
15+
- To point to an IPv6 address, select `AAAA`, use {props.name} (<code>{props.example}</code>) for the record **Name**, and insert the IPv6 address in the respective field.
16+
- To point to a [fully qualified domain name (FQDN)](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) (such as `your-site.host.example.com`), select `CNAME`, use {props.name} (<code>{props.example}</code>) for the record **Name**, and insert the fully qualified domain name in the **Target** field.
17+
4. Specify the <GlossaryTooltip term="proxy status" link="/dns/manage-dns-records/reference/proxied-dns-records/">**Proxy status**</GlossaryTooltip> and <GlossaryTooltip term="time-to-live (TTL)" link="/dns/manage-dns-records/reference/ttl/">**TTL**</GlossaryTooltip> according to your needs.
18+
5. Select **Save** to confirm.
19+
</TabItem>
20+
<TabItem label="API">
21+
Use the [Create DNS Record API endpoint](/api/operations/dns-records-for-a-zone-create-dns-record).
22+
<Render file="api-field-definitions" product="dns"/>
23+
- To point to an IPv4 address, select **A Record**, use {props.name} (<code>{props.example}</code>) for the field `name`, and use the IPv4 address for the field `content`.
24+
- To point to an IPv6 address, select **AAAA Record**, use {props.name} (<code>{props.example}</code>) for the field `name`, and use the IPv6 address for the field `content`.
25+
- To point to a [fully qualified domain name (FQDN)](https://en.wikipedia.org/wiki/Fully_qualified_domain_name) (such as `your-site.host.example.com`), select **CNAME Record**, use {props.name} (<code>{props.example}</code>) for the field `name`, and use the fully qualified domain name for the field `content`.
26+
</TabItem>
27+
</Tabs>

0 commit comments

Comments
 (0)