ConfigurationCustomize branding

Bring your custom domain

Bring Fern Docs to your custom domain.

You can use:

  • A custom domain, such as example.com
  • 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 Starter plan and above. Want to get set up? Reach out in Discord or email us.

Steps

Step 1: Open docs.yml

Open the docs.yml file, which lives in the fern/ folder of your Fern Docs repository.

No Fern Docs repository yet? Use our Fern Docs Quickstart with OpenAPI or Fern Docs Quickstart with Fern Definition to set up your starter site, then return to this page.

Step 2: Configure the url

The subdomain of the url under instances must match your custom domain. If you want to use a custom domain of example.com, the subdomain must be example, as shown below:

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

Leave the .docs.buildwithfern.com part of the url unchanged.

If you intend to use a subpath with your custom domain, such as example.com/docs, append that subpath to the end of the url:

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

Step 3: Configure the custom-domain

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

The examples use docs for the subdomain and subpath specified in custom-domain, but you can use any word you like, such as reference or learn.
1instances:
2 - url: example.docs.buildwithfern.com
3 custom-domain: docs.example.com

Step 4: 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.

Step 5: Create DNS records to point at Fern Docs

This feature is available on the Fern Docs Starter plan and above. Reach out to sales@buildwithfern.com to set up your subscription and obtain DNS records information for your domain registrar.