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
Subdomain
To host your documentation on a subdomain, i.e. docs.mydomain.com
, you need to create a CNAME record in your DNS settings.
Create a CNAME record
- Log in to your domain registrar’s dashboard.
- Navigate to the DNS settings for your domain.
- 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.
- Type:
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.
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.
Subpath
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.
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
.
Configure the custom-domain
Below the url
, add a custom-domain
key as shown in the examples below.
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
.
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.