For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Getting started
    • Overview
    • How it works
    • Quickstart
    • Project structure
    • Customer showcase
    • Changelog
  • Configuration
    • Overview
    • Site-level settings
    • Page-level settings
  • Writing content
    • Markdown basics
    • Rich media in Markdown
    • Fern Editor
    • Reusable snippets
  • AI features
    • Overview
    • Fern Writer
    • AI-generated examples
    • Markdown access
      • Overview
      • Customize LLM output
      • Agent directives
      • Analytics and integration
    • MCP server
    • API catalog discovery
      • Preview changes
      • Publishing your docs
      • Setting up your domain
      • Reverse proxy setup
      • Multi-source docs
  • Public API
    • GETJWT from Fern API key
    • GETAlgolia search credentials
    • GETCurrent user information
  • Fern Writer API
    • GETGet Fern Writer Install Link
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
On this page
  • Manual setup
  • Multiple custom domains
Preview & publish

Bring your custom domain

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Publishing your docs

Next

Reverse proxy setup

You can configure any of the following custom domain types:

  • Subdomain: docs.mydomain.com
  • Subpath: mydomain.com/docs
  • Root domain: mydomain.com

Fern recommends using the Fern Dashboard to set up 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.

Manual setup

Expand the section below that matches your domain type:

Subdomain

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

1

Update the domain in docs.yml

Add your custom-domain and merge your changes into main. Here’s an example.

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

Contact Fern

Contact Fern via your dedicated Slack channel or email to receive:

  • A unique CNAME value for your site
  • A TXT record to verify your domain
3

Create DNS records

Log in to your domain registrar’s dashboard and navigate to the DNS settings for your domain. Add the following records:

CNAME Record (Subdomain)
Type Name Value
CNAME docs b7278b3c9357963d.vercel-dns-013.com
TXT Record (Domain Verification)
Type Name Value
TXT @ [TXT record value provided by Fern]

Replace docs with any subdomain you want to use.

Cloudflare users

If you are using Cloudflare, you should ensure the record isn’t proxied.

4

Verify the setup

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.

Check that you can access your new docs site from a mobile device or incognito browser.
Subpath
Team and Enterprise feature

This feature is available only for the Team and Enterprise plans. To get started, reach out to support@buildwithfern.com.

To host your documentation on a subpath like mydomain.com/docs, you need to edit your docs.yml configuration and set up a reverse proxy on your infrastructure.

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
1instances:
2 - url: example.docs.buildwithfern.com/docs
2

Configure the custom-domain

Below the url, add a custom-domain key:

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

Here’s an example.

3

Set up a reverse proxy

A subpath can’t be routed with DNS alone — your infrastructure has to forward requests from mydomain.com/docs to Fern’s origin with the x-fern-host header set to your bare domain. Follow the reverse proxy setup instructions for your provider (Cloudflare Workers, AWS CloudFront, Netlify, Vercel, Nginx, Akamai, or Caddy).

4

Contact Fern

Contact Fern via your dedicated Slack channel or email to set up your custom subpath.

5

Verify the setup

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. Try accessing your new docs site from a mobile device or incognito browser to confirm everything is working.

HTTP/2 transfer errors with nginx

If you see partial page loads or HTTP/2 transfer errors, nginx’s lack of native Brotli support may be the cause. Fern’s CDN serves Brotli-compressed responses by default, which nginx can’t decode when proxying upstream.

Add this directive to your nginx config to request only supported encodings:

1proxy_set_header Accept-Encoding "gzip,deflate";
Root domain

To host your documentation on a root domain like mydomain.com, you need to edit your docs.yml configuration and configure DNS records.

1

Configure the url in docs.yml

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

Here’s an example.

2

Contact Fern

Contact Fern via your dedicated Slack channel or email to receive:

  • A unique CNAME value for your site
  • A TXT record to verify your domain
3

Configure your DNS settings

You’ll need the following DNS records configured for your root domain.

CNAME Record (WWW Subdomain)
Type Name Value
CNAME www b7278b3c9357963d.vercel-dns-013.com
A Record (Apex Domain)
Type Name Value
A @ 76.76.21.21
TXT Record (Domain Verification)
Type Name Value
TXT @ [TXT record value provided by Fern]

This redirects mydomain.com to www.mydomain.com.

After you add these records, Fern will provision a SSL certificate.

4

Verify the setup

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.

Check that you can access your new docs site from a mobile device or incognito browser.

Multiple custom domains

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:

docs.yml
1instances:
2 - url: example.docs.buildwithfern.com
3 custom-domain:
4 - www.mydomain.com
5 - partner.otherdomain.com

After configuring multiple domains in your docs.yml, contact Fern via your dedicated Slack channel or email to complete the setup. You’ll receive DNS configuration details for each domain.