Bring your custom domain

Bring Fern Docs to your custom domain.

You can use:

  • A subdomain on your custom domain, such as docs.example.com
  • A subpath on your custom domain, such as example.com/docs
This feature is available on the Basic plan and above. Contact us to get set up.

To host your documentation on a subdomain, i.e. docs.mydomain.com, you need to create a CNAME record in your DNS settings.

1

Update the domain in docs.yml

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

Merge your changes into main. Here’s an example.

2

Create a CNAME record

  1. Log in to your domain registrar’s dashboard.
  2. Navigate to the DNS settings for your domain.
  3. Add a new CNAME record with the following details:
    • Type: CNAME
    • Name: docs (or any subdomain you want to use)
    • Value: cname.vercel-dns.com.
3

Reach out to us

Once you’ve completed the steps above, reach out via your dedicated Slack channel or email.

You may need to create a TXT record to verify your domain. If you do, we’ll provide you with the record to add.

4

Verify the setup

Once we’ve completed the setup on our end, you should 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.

It’s helpful to check that you can access your new docs site from a mobile device or incognito browser.

To host your documentation on a subpath, i.e. 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.

1

Configure the url in docs.yml

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.

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

Configure the custom-domain

Below the url, add a custom-domain key as shown in the examples below.

Custom subpath
1instances:
2 - url: example.docs.buildwithfern.com/docs
3 custom-domain: example.com/docs

Here’s an example.

3

Update the Fern Docs site

If you created your Fern Docs site using one of our Docs Quickstarts, push the changes you made to your GitHub repository. This runs a GitHub Action to update the site with your new configuration.

If you need to update your Fern Docs site manually, run fern generate --docs.

4

Reach out to us

This feature is available on the Fern Docs Basic plan and above. Reach out to sales@buildwithfern.com to set up your subscription and obtain the configuration for setting up your custom subpath.

Built with