Documentation

Configuring SEO and Open Graph

With Display Page Templates, you can create standard formats for displaying different content types, such as Web Content Articles, Documents, and Blog Entries. When configuring a template, you can define SEO and Open Graph fields that are dynamically filled for your displayed content.

To create or configure these settings for an existing Display Page template, go to DesignPage Templates in the Site menu, and click on the Display Page Templates tab.

Click on the Display Page Templates tab.

Create a new template using the Add button (Add button), or edit an existing template by clicking on its Actions button (Actions button) and selecting Configure. Here, configuration options are organized into two tabs: SEO and Open Graph.

Configuring SEO Settings

Search engine optimization (SEO) refers to the methods used to improve your Page’s ranking in a search engine results page (SERP). With Liferay DXP, you can create Display Page templates that dynamically configure your displayed content for optimal SEO.

HTML Title

The HTML Title field defines a Display Page’s <title> tag. This title is used by search engines to rank your Page and serves as the Page’s heading in search engine results. By default, Display Page templates map this field to Title, but you can select any other Text field. The recommended length for an HTML title is under 60 characters.

The HTML Title field defines a Display Page's title meta tag

Description

The Description field defines a Display Page’s description <meta> tag. This description is used by search engines to rank your Page and appears in search engine results as a preview of your Page. By default, Display Page templates map this field to Description, but you can select any other Text field. The recommended length for a Page’s description is under 155 characters.

The Description field defines a Display Page's description meta tag.

Robots

The Robots field configures robots.txt rules for a Display Page. These rules provide instructions to search engines and other tools crawling and indexing your Site, defining what paths should or should not be crawled. Note that web crawlers may or may not obey instructions in robots.txt. You can also localize this field using the Language Flag.

The Robots field configures robots.txt rules for a Display Page.

Sitemap

Determine whether to include a Display Page in your sitemap.xml file, as well as set its Priority and Change Frequency. These fields inform search engines whether to crawl and index the Display Page, how it should be prioritized relative to other Site Pages, and how frequently it is updated.

Determine whether to include a Display Page in your sitemap.xml file, as well as set its Priority and Change Frequency.

Configuring Open Graph Settings

Open Graph is an Internet protocol that standardizes how a Site’s metadata appears on social networks. With Liferay DXP, you can create Display Page templates that dynamically configure a Page’s Open Graph <meta> tags.

Note

For your displayed content, values defined here override default values defined elsewhere in your Liferay instance.

Title

The Title field defines a Display Page’s og:title property, which defines the title displayed for your content in rich previews. By default, this field is mapped to Title, like the HTML title field for SEO. While you can select any other Text field, it’s best practice to update SEO and Open Graph titles together.

The Title field defines a Display Page's og:title property.

Description

The Description field defines a Display Page’s og:description property, which determines the description displayed for your content in rich previews. By default, Display Page templates map this field to Description, like the description field for SEO. While you can select any other Text field, it’s best practice to update SEO and Open Graph descriptions together.

The Description field defines a Display Page's og:description property.

Image

The Image field defines a Display Page’s og:image properties, which configures the image displayed for your content in rich previews. In addition to the basic image tag, DXP automatically adds a number of structured properties that determine how your selected image is displayed. The Image field defines the following <meta> tags.

<meta property="og:image" content="http://example.com/ogp.jpg" />
<meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />

By default, this field is unmapped in Display Page templates. This means the template defaults to the image set at Site level, unless you select a different Image field.

The Image field defines a Display Page's og:image property.

Image Alt Description

The Image Alt Description field defines a Display Page’s og:image:alt property, which determines the alt text read by screen readers for your displayed content’s og:image property.

<meta property="og:image:alt" content="This is an example." />

By default, this field is unmapped in Display Page templates. This means the template defaults to the alt text set at the Site level, unless you select a different Text field.

The Image Alt Description field defines a Display Page's og:image:alt property