Special Metadata Properties
In addition to all well-known metadata properties, AEM also supports the following properties with special handling:
canonical
The canonical property will be used as the canonical URL in the following tags:
<link rel=”canonical” content="https://www.example.com/path"><meta property="og:url" content="https://www.example.com/path"><meta name="twitter:url" content="https://www.example.com/path">
If not specified, AEM will generate the canonical URL automatically using the cdn.prod.host property in your project configuration. See here for more information.
canonical:extension
The canonical:extension property (e.g. html) allows you to define the file extension for canonical URLs. This is useful for ensuring consistent and SEO-friendly canonical URLs across your site, for example after a migration, even if the actual file paths do not include the extension.
<link rel=”canonical” content="https://www.example.com/path.html"><meta property="og:url" content="https://www.example.com/path.html"><meta name="twitter:url" content="https://www.example.com/path.html">
To avoid having to repeat it for many documents, this property is best used in the bulk metadata sheet.
description
The description property appears in the following tags:
<meta name="description" content="Welcome to the homepage of Acme Corp"><meta property="og:description" content="Welcome to the homepage of Acme Corp"><meta name="twitter:description" content="Welcome to the homepage of Acme Corp">
If not specified, AEM will use the first text paragraph with 10 words or more found on the page.
html-lang
The html-lang property helps you define the page language by adding an HTML lang attribute:
<html lang="en-US">
To avoid having to repeat it for many documents, this property is best used in the bulk metadata sheet.
Note: Google ignores this attribute, so consider managing your content languages via hreflang links in the sitemap instead.
html-title:suffix
The html-title:suffix property (e.g. | Acme Corp) works like the title:suffix, but only gets applied to the HTML title tag, while title-related meta tags are left unchanged
<title>Page Title | Acme Corp</title>
This is useful to apply branding, to add consistent information, or to meet specific SEO requirements across a set of pages. To avoid having to repeat it for many documents, this property is best used in the bulk metadata sheet.
Note: AEM will always insert a space between the title and the suffix.
hreflang:{lang}
The hreflang:{lang} property adds an alternate language (hreflang) link to a page and will be rendered like this:
<link rel="alternate" hreflang="de" href="https://www.example.com/de/path">
Replace {lang} with a BCP 47 language tag such as de, en-US or fr_CA.
Note: consider managing hreflang links in the sitemap instead to avoid unnecessary page size growth.
image
The image property can be used to define the image URL in the following HTML tags:
<meta property="og:image" content="https://www.example.com/media_1234567890.png"><meta property="og:image:secure_url" content="https://www.example.com/media_1234567890.png"><meta name="twitter:image" content="https://www.example.com/media_1234567890.png">
If not specified, AEM will use the first image found on the page. If the page does not contain any images, the default value will be set to /default-meta-image.png. You can add this file to your content or code root folder to ensure that every page has a proper image when "unfurled" in a URL preview.
json-ld
The json-ld property can be used to add a JSON object for Linked Data rendered like this:
<script type=”application/ld+json”>{ "@context": "https://schema.org", "@type": "Organization", "name": "Acme Corp" }</script>
Note: consider other methods, like client-side JavaScript or head.html to add a JSON schema to your page. In many cases, metadata is not the right approach.
tags
The tags property can be used to provide a list of tags, separated by commas or as a bullet list. Each tag will be rendered like this:
<meta property="article:tag" content="Finance">
title
The title property will be used in the following tags:
<meta property="og:title" content="Page Title"><meta name="twitter:title" content="Page Title"><title>Page Title</title>
If not specified, AEM will use the first Heading 1 (h1) found on the page.
title:suffix
The title:suffix property (e.g. | Acme Corp) enables you to automatically append a specified suffix to the title property of your pages:
<meta property="og:title" content="Page Title | Acme Corp"><meta name="twitter:title" content="Page Title | Acme Corp"><title>Page Title | Acme Corp</title>
This is useful to apply branding, to add consistent information, or to meet specific SEO requirements across a set of pages. To avoid having to repeat it for many documents, this property is best used in the bulk metadata sheet.
Note: AEM will always insert a space between the title and the suffix.