---
title: SEO view configuration
slug: experience/seo-view-configuration
docTags: 
createdAt: 2024-11-18T11:52:49.564Z
---

# General

This section explains the possibilities of configuring data for search engine optimization.

# Open Graph

Keys prefixed with og\_ are there to set [Open Graph](https://ogp.me/) metadata. They are generally rendered as follows:

::::CodeDrawer{title="Open Graph example" isResponseExpanded="true" autoGeneratedAnchorSlug="open-graph-example" legacyHash="LvVNqULkELPlo-vpaQLOt"}
:::CodeblockTabsExamples
```json
{
  og_description: "some description"
}
```
:::

:::CodeblockTabsResponses
```javascript
<meta property="og:description" content="some description">
```
:::
::::

# Twitter

Keys prefixed with twitter\_ can be used to set Twitter metadata. They are generally rendered as follows:

::::CodeDrawer{title="Twitter example" isResponseExpanded="true" autoGeneratedAnchorSlug="twitter-example" legacyHash="aanJ3HKuSkhxpprGfCzW7"}
:::CodeblockTabsExamples
```json
{
  twitter_site: "@username"
}
```
:::

:::CodeblockTabsResponses
```javascript
<meta name="twitter:site" content="@username">
```
:::
::::

It is also possible to provide additional label and data values setting `twitter_misc` as an object. In that case, meta tags will be rendered in a way that for each key-value pair, there will be two meta tags with `name="twitter:labelX`" and `"twitter:valueX"` with their `content` values being the corresponding key and value, e.g.:

::::CodeDrawer{title="Twitter misc example" isResponseExpanded="true" autoGeneratedAnchorSlug="twitter-misc-example" legacyHash="-6zNPfhK4A1mqN9rfL6jW"}
:::CodeblockTabsExamples
```json
twitter_misc: {
  "Written by": "author",
  "Est. reading time": "5 minutes"
}
```
:::

:::CodeblockTabsResponses
```javascript
<meta name="twitter:label1" content="Written by">
<meta name="twitter:data1" content="author">
<meta name="twitter:label2" content="Est. reading time">
<meta name="twitter:data2" content="5 minutes">
```
:::
::::

# Languages

**language**: Sets the language on the HTML tag. Falls back to the value set in experience.config.json or 'en' if none is set.

**alternates**: Sets alternate language links for the current page. `path` has to be a relative URL and the full URL will be calculated at runtime.

# Robots

Sets the robots value for search engines.

:::hint{type="warning"}
To prevent accidental indexing of sites, the value of robots is only set on custom domains and only, if preview is not set, otherwise "noindex, nofollow" is set.
:::

# Custom meta tags

It is also possible to provide additional custom tags. Those will be rendered as follows:

::::CodeDrawer{title="Custom meta tags example" isResponseExpanded="true" autoGeneratedAnchorSlug="custom-meta-tags-example" legacyHash="iIRb04vKa91wL-8qCFkw3"}
:::CodeblockTabsExamples
```json
{
  "key": "value"
}
```
:::

:::CodeblockTabsResponses
```javascript
<meta name="key" content="value">
```
:::
::::

# Content SEO metadata

On pages where the content body component is used (e.g. article pages), additional SEO metadata might be set automatically, if the content provides it via the Yoast plugin. The configuration on the view level always supersedes the one from the content, e.g. if the view has a title configured, the content will not attempt to set its own title as metadata.&#x20;

# Exceptions

Some keys should not be configured in the SEO object:

**canonical & og\_url:&#x20;**&#x45;xperience will generate the canonical URL automatically, therefore setting canonical or og\_url manually will not have any effect.

**title:&#x20;**&#x54;he title should be set using the corresponding field on the [View settings](docId:-JL6ufl2jD2uS8qkfrBpP) configuration field instead.

