Versioning
Learn how to add versioning to your Fern documentation. Configure multiple doc versions, customize version selectors, and manage version-specific content.
Versioning is available on all plans: up to 3 versions on Basic, 10 versions on Pro, or unlimited on Enterprise. Contact support@buildwithfern.com for more information.

Each version of your docs can contain its own distinct tabs, sections, pages, and API references. Versions can share content, as well.
For displaying version-specific content within a single page, use the <Versions> component. You can use site-wide versioning and the <Versions> component independently or together.
Add versions to your docs
Define your versions
Create a versions folder inside of your fern folder. To specify the contents of each version, add a .yml file to the versions folder to define the navigational structure of that version. Make sure to include the navigation and tabs properties, if applicable.
Version-specific yml files:
Add your version configuration
Define a version in the top-level docs.yml by adding an item to the versions list and specifying the display-name and path.
Default versions
Versions appear in a dropdown on your site in the order listed in docs.yml. The first version in your versions list is the default version and uses unversioned paths like example.com/getting-started. Other versions use versioned paths like example.com/v2/getting-started.
Fern automatically handles version routing by redirecting broken versioned links to the default version. Canonical URLs point to the unversioned path to consolidate SEO signals. To override this for version-specific pages, see SEO metadata.
Indicate availability
You can optionally set the availability status for each version. Options are deprecated, ga, stable, and beta.
Version availability is distinct from section and page availability, with different options. If you want to set section and page availability, do so in your version-specific yml files.
Customize version behavior
These optional settings let you control how versions appear in URLs and who can access them.
Change version slugs
By default, Fern generates URL slugs from the display-name by converting it to lowercase and replacing spaces with hyphens. For example, a version with display-name: v3 (Deprecated) would get the slug v-3-deprecated in the URL path.
To customize the URL slug for a version, use the slug property:
In this example, setting slug: v3 produces URLs like /docs/v3/getting-started.
Add instance audiences
Control which versions appear in each documentation instance by tagging them with audiences. This enables separate sites for different user groups (e.g., internal developers, beta testers, public customers).
Content is filtered based on audience tags:
- Match: Content with an audience matching the instance audience is included
- No match: Content with a non-matching audience is excluded
- No audience: Content without an audience tag is included by default
Define audiences for instances and versions in docs.yml:
Customize version styling
Use custom CSS to style the version selector to match your brand.
Selector styling
You can directly customize the appearance of the version selector by targeting the fern-version-selector CSS class.
Adjusting positioning:
Use transform: translateY(Npx) to adjust the vertical positioning of the selectors. This ensures that the selectors match the line height of your logo for better visual alignment.
Enhancing visual prominence: You can modify the border radius and add borders to make the selectors more prominent and better integrated with your site’s design aesthetic.
Dropdown styling
The dropdown menu for the version selector can be customized using the fern-version-selector-radio-group CSS class.
