You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can now configure custom domains for your documentation site directly in the [Fern Dashboard](https://dashboard.buildwithfern.com/). The dashboard automatically displays the DNS records you need to add to your domain registrar based on your domain type.
4
+
5
+
[Learn more](/learn/dashboard/configuration/custom-domains) about setting up your custom domain.
description: Use the Fern Dashboard to configure your custom domain with DNS records for subdomain, subpath, or root domain hosting.
4
+
---
5
+
6
+
You can use the [Fern Dashboard](https://dashboard.buildwithfern.com/) to configure any of the following custom domain types:
7
+
-**Subdomain**: `docs.mydomain.com`
8
+
-**Subpath**: `mydomain.com/docs`
9
+
-**Root domain**: `mydomain.com`
10
+
11
+
The Dashboard automatically provides the correct DNS records based on your domain type.
12
+
13
+
<Note>
14
+
Alternatively, you can [set up your custom domain by manually configuring DNS records](/learn/docs/preview-publish/setting-up-your-domain).
15
+
</Note>
16
+
17
+
## Setup
18
+
19
+
<Steps>
20
+
<Steptitle="Open the Dashboard">
21
+
22
+
Navigate to the [Fern Dashboard](https://dashboard.buildwithfern.com/) and select your documentation site.
23
+
</Step>
24
+
25
+
<Steptitle="Add your custom domain">
26
+
27
+
In the **Domains** section of the **Overview** tab, select **Add Custom Domain** and enter your domain. The dashboard displays the DNS records you need to configure.
28
+
29
+
</Step>
30
+
31
+
<Steptitle="Update the domain in `docs.yml`">
32
+
33
+
Add your `custom-domain` to your `docs.yml` configuration:
34
+
35
+
```yaml docs.yml
36
+
instances:
37
+
- url: example.docs.buildwithfern.com
38
+
custom-domain: docs.mydomain.com
39
+
```
40
+
41
+
</Step>
42
+
43
+
<Step title="Configure DNS records">
44
+
45
+
Log in to your domain registrar and add the DNS records shown in the Fern Dashboard. The specific records depend on your domain type (subdomain, subpath, or root domain).
46
+
</Step>
47
+
48
+
<Step title="Verify the setup">
49
+
50
+
Once you've added the DNS records, return to the Fern Dashboard to verify your domain. SSL is automatically provisioned for your domain, but it may take a few minutes to propagate globally.
51
+
52
+
<Tip>Check that you can access your new docs site from a mobile device or incognito browser.</Tip>
Copy file name to clipboardExpand all lines: fern/products/docs/pages/getting-started/setting-up-your-domain.mdx
+42-33Lines changed: 42 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,23 +3,24 @@ title: Bring your custom domain
3
3
description: Learn how to set up your Fern-generated documentation site to use a custom subdomain or subpath.
4
4
---
5
5
6
-
Bring Fern Docs to your custom domain. You can use:
7
-
-A subdomain on your custom domain, such as`docs.mydomain.com`
8
-
-A subpath on your custom domain, such as`mydomain.com/docs`
9
-
-A root domain, such as`mydomain.com`
6
+
You can configure any of the following custom domain types:
7
+
-**Subdomain**:`docs.mydomain.com`
8
+
-**Subpath**:`mydomain.com/docs`
9
+
-**Root domain**:`mydomain.com`
10
10
11
-
<Info>
12
-
Once you've set up your domain, use the [Fern Dashboard](https://dashboard.buildwithfern.com/) to manage site settings.
13
-
</Info>
11
+
Fern recommends [using the Fern Dashboard to set up custom domains](/learn/dashboard/configuration/custom-domains). The Dashboard automatically provides the correct DNS records based on your domain type. If you prefer to configure your domain manually, follow the instructions on this page.
12
+
13
+
## Manual setup
14
+
15
+
Expand the section below that matches your domain type:
14
16
15
17
<AccordionGroup>
16
-
<Accordiontitle="Subdomain">
18
+
<Accordiontitle="Subdomain">
17
19
18
20
To host your documentation on a subdomain like `docs.mydomain.com`, you need to create a CNAME record in your DNS settings.
19
21
20
22
<Steps>
21
-
22
-
### Update the domain in `docs.yml`
23
+
<Steptitle="Update the domain in `docs.yml`">
23
24
24
25
Add your `custom-domain` and merge your changes into `main`. [Here's an example](https://github.com/octoml/fern-config/blob/389b67679953856ba0716537981a6d749635556f/fern/docs.yml#L1-L3).
25
26
@@ -28,14 +29,16 @@ instances:
28
29
- url: example.docs.buildwithfern.com
29
30
custom-domain: docs.mydomain.com
30
31
```
32
+
</Step>
31
33
32
-
### Contact Fern
34
+
<Step title="Contact Fern">
33
35
34
36
Contact Fern via your dedicated Slack channel or [email](mailto:[email protected]) to receive:
35
37
- A unique CNAME value for your site
36
38
- A TXT record to verify your domain
39
+
</Step>
37
40
38
-
### Create DNS records
41
+
<Step title="Create DNS records">
39
42
40
43
Log in to your domain registrar's dashboard and navigate to the DNS settings for your domain. Add the following records:
41
44
@@ -58,34 +61,36 @@ Replace `docs` with any subdomain you want to use.
58
61
<Warningtitle="Cloudflare users">
59
62
If you are using Cloudflare, you should ensure the record isn't proxied.
60
63
</Warning>
64
+
</Step>
61
65
62
-
### Verify the setup
66
+
<Steptitle="Verify the setup">
63
67
64
68
Once Fern has completed your setup, you'll be able to access your documentation at `docs.mydomain.com`. SSL will be automatically provisioned for your domain, but it may take a few minutes to propagate globally.
65
69
66
70
<Tip>Check that you can access your new docs site from a mobile device or incognito browser.</Tip>
71
+
</Step>
67
72
68
73
</Steps>
69
74
</Accordion>
70
75
71
-
<Accordiontitle="Subpath">
76
+
<Accordiontitle="Subpath">
72
77
73
78
To host your documentation on a subpath like `mydomain.com/docs`, you need to edit your `docs.yml` configuration and then get provider-specific instructions for setting up the subpath. Common providers include Cloudflare, AWS Route53 and Cloudfront, Netlify, and Vercel.
74
79
75
80
<Steps>
76
-
77
-
### Configure the `url` in `docs.yml`
81
+
<Steptitle="Configure the `url` in `docs.yml`">
78
82
79
83
Append that subpath to the end of the `url`. This example use `docs` for the subpath, but you can use any word you like, such as `reference` or `developer`.
80
84
81
85
<CodeBlocktitle="docs.yml">
82
86
```yaml
83
-
instances:
87
+
instances:
84
88
- url: example.docs.buildwithfern.com/docs
85
89
```
86
90
</CodeBlock>
91
+
</Step>
87
92
88
-
### Configure the `custom-domain`
93
+
<Step title="Configure the `custom-domain`">
89
94
90
95
Below the `url`, add a `custom-domain` key:
91
96
@@ -98,26 +103,28 @@ instances:
98
103
</CodeBlock>
99
104
100
105
[Here's an example.](https://github.com/fern-api/fern/blob/7d8631c6119787a8aaccb4ba49837e73c985db28/fern/docs.yml#L1-L3)
106
+
</Step>
101
107
102
-
### Contact Fern
108
+
<Step title="Contact Fern">
103
109
104
-
Contact Fern via your dedicated Slack channel or [email](mailto:[email protected]) to set up your custom subpath.
110
+
Contact Fern via your dedicated Slack channel or [email](mailto:[email protected]) to set up your custom subpath.
111
+
</Step>
105
112
106
-
### Verify the setup
113
+
<Step title="Verify the setup">
107
114
108
115
Once Fern has completed your setup, you'll be able to access your documentation at `mydomain.com/docs`. It may take a few minutes for DNS changes to propagate globally.
109
116
110
117
<Tip>Check that you can access your new docs site from a mobile device or incognito browser.</Tip>
118
+
</Step>
111
119
112
120
</Steps>
113
121
</Accordion>
114
-
<Accordion title = "Root domain">
122
+
<Accordion title="Root domain">
115
123
116
124
To host your documentation on a root domain like `mydomain.com`, you need to edit your `docs.yml` configuration and then get provider-specific instructions for setting up the domain. Common providers include Cloudflare, AWS Route53 and Cloudfront, Netlify, and Vercel.
117
125
118
126
<Steps>
119
-
120
-
### Configure the `url` in `docs.yml`
127
+
<Step title="Configure the `url` in `docs.yml`">
121
128
122
129
<CodeBlock title="docs.yml">
123
130
```yaml
@@ -128,14 +135,16 @@ instances:
128
135
</CodeBlock>
129
136
130
137
[Here's an example.](https://github.com/dannysheridan/katiedanny/blob/2fcf5769e2994af29e31d00904e04788b188a18b/fern/docs.yml#L3-L5)
138
+
</Step>
131
139
132
-
### Contact Fern
140
+
<Step title="Contact Fern">
133
141
134
142
Contact Fern via your dedicated Slack channel or [email](mailto:[email protected]) to receive:
135
143
- A unique CNAME value for your site
136
144
- A TXT record to verify your domain
145
+
</Step>
137
146
138
-
### Configure your DNS settings
147
+
<Step title="Configure your DNS settings">
139
148
140
149
You'll need the following DNS records configured for your root domain.
141
150
@@ -163,20 +172,22 @@ TXT @ [TXT record value provided by Fern]
163
172
This redirects `mydomain.com` to `www.mydomain.com`.
164
173
165
174
After you add these records, Fern will provision a SSL certificate.
175
+
</Step>
166
176
167
-
### Verify the setup
177
+
<Step title="Verify the setup">
168
178
169
179
Once Fern has completed your setup, you'll be able to access your documentation at `mydomain.com`. SSL will be automatically provisioned for your domain, but it may take a few minutes to propagate globally.
170
180
171
181
<Tip>Check that you can access your new docs site from a mobile device or incognito browser.</Tip>
182
+
</Step>
172
183
173
184
</Steps>
174
185
</Accordion>
175
-
</AccordionGroup>
186
+
</AccordionGroup>
176
187
177
-
## Multiple custom domains
188
+
### Multiple custom domains
178
189
179
-
To serve your documentation from multiple custom domains (e.g., for partner or white-label deployments), configure an array of domains:
190
+
To serve your documentation from multiple custom domains (e.g., for partner or white-label deployments), follow the above steps for each domain (subdomain, subpath, or root domain), then configure an array in your `docs.yml`:
180
191
181
192
```yaml docs.yml
182
193
instances:
@@ -186,8 +197,6 @@ instances:
186
197
- partner.otherdomain.com
187
198
```
188
199
189
-
This works with any of the above domain types (subdomain, subpath, or root domain).
190
-
191
200
<Info>
192
201
After configuring multiple domains in your `docs.yml`, contact Fern via your dedicated Slack channel or [email](mailto:[email protected]) to complete the setup. You'll receive DNS configuration details for each domain.
0 commit comments