Configure SEO metadata
Optimize your documentation’s search visibility and social media presence by configuring SEO metadata at the page or site level. Properly configured metadata helps search engines understand your content and creates compelling previews when your pages are shared on social platforms.
When configuring SEO metadata, ensure your titles and descriptions are unique, descriptive, and relevant to the page content. Keep descriptions between 150-160 characters for optimal display in search results.
Page metadata
Set SEO properties in each page’s frontmatter to control how individual pages appear in search results and social media shares. Page-level metadata takes precedence over site-wide settings.
Document properties
When set, the <title />
tag in the document head will use this value rather than the title
property. This property changes the title that search engines see when crawling this page, and can be used to address Duplicate Title issues in your SEO report.
Overrides the canonical URL for this page. Must be a full URL including the protocol (i.e. https://buildwithfern.com/learn/docs/content/frontmatter
)
Comma-separated string of keywords relevant to the page content (i.e. plants, garden, nursery
). These keywords help search engines understand the page topic and contributes to search rankings. Use specific, relevant terms that users might search for when looking for the page’s content.
This field accepts only comma-separated strings, not bracketed arrays.
OpenGraph properties
The name of your website as it should appear when your content is shared.
The title of your page as it should appear when your content is shared.
The description of your page as it should appear when your content is shared.
The URL of your page.
The URL or identifier of the image that will be displayed when your content is shared.
The width of the image in pixels.
The height of the image in pixels.
The locale of the page, typically in the format language_TERRITORY
(e.g., en_US
).
The URL or identifier of the logo image of your website that will be displayed when your content is shared.
Twitter properties
The title of your page as it should appear in a tweet.
The description of your page as it should appear in a tweet.
The Twitter handle of the page creator or site.
The URL or identifier of the image that will be displayed in a tweet.
The name of your website as it should appear in a tweet.
The URL of your page.
The type of card to be used for sharing on Twitter. Options: summary
, summary_large_image
, app
, player
Indexing properties
If set to true
, the page will not be indexed by search engines.
If set to true
, a search engine will not follow any links present on the page.
Website metadata
Define default SEO properties for your entire documentation site in your docs.yml
file. These settings apply to all pages unless overridden by page-specific metadata.
The name of your website for Open Graph tags.
The title shown in social media previews.
The description shown in social media previews.
The canonical URL of your documentation.
The image shown in social media previews. Recommended size is 1200x630 pixels.
The width of your Open Graph image in pixels.
The height of your Open Graph image in pixels.
The locale of your content (e.g., “en_US”).
URL to your company logo.
The title shown in Twitter Card previews.
The description shown in Twitter Card previews.
Your company’s Twitter handle.
The image shown in Twitter Card previews.
The Twitter handle for your website.
The Twitter Card type. Options are summary
, summary_large_image
, app
, or player
.