Building a Purple Experience
...
views.json
View

SEO view configuration

7min

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 metadata. They are generally rendered as follows:

Twitter

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

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.:

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.

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:

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.

Exceptions

Some keys should not be configured in the SEO object:

canonical & og_url: Experience will generate the canonical URL automatically, therefore setting canonical or og_url manually will not have any effect.

title: The title should be set using the corresponding field on the View configuration field instead.