Configurations

Fern | Bring your custom domain to your Fern Docs

Learn how to bring your own custom domain to Fern Docs.

Note: Custom domains is a paid feature. Want to get set up? Reach out in Discord or email us.

1. Adding your domain to docs.yml

First decide what subdomain to use with your documentation. The most common options are https://docs.example.com or https://example.com/docs.

We’ll add the following to docs.yml to tell Fern Docs to publish to example.docs.buildwithfern.com:

docs.yml
1instances:
2 - url: example.docs.buildwithfern.com

When ready to publish to a custom domain, add the custom-domain key to the instance. Note that this is a paid feature. For example:

docs.yml
1instances:
2 - url: example.docs.buildwithfern.com
3+ custom-domain: docs.example.com

2. Running the generator

In the example above, by running fern generate --docs, we’d see:

Terminal
$┌─
>│ ⠂ Publish docs
>└─

followed by

Terminal
$[api]: Published docs to https://example.docs.buildwithfern.com
>┌─
>│ ✓ Publish docs
>└─

3. Creating DNS records to point at Fern Docs

Next, you’ll need to get the DNS records by adding Fern Docs to your subscription. You can do this by reaching out sales@buildwithfern.com.