Sites Metatag¶
Sets the canonical link and the hreflang alternates of content pages from the sites that show the content, through Metatag. Metatag's Canonical URL tag follows the sites: Torqline, showing the group's press release, names the page on Valtora, its origin site, as canonical. The Hreflang alternates (Sites) tag names the page's translations there. Without the module, every site's canonical link names its own page, and the status report warns.
Install¶
Ships with Sites; with that project in the codebase:
drush en sites_metatag
Requires Sites, metatag (metatag).
Configure¶
- Enable the module with Drush: its install switches on the hreflang and shortlink tags in Metatag's global defaults, a step it skips during a configuration import. Export the configuration afterwards, so the other environments get the tags with it.
- Leave
metatag_hreflangoff: the Hreflang alternates (Sites) tag sets the alternates. - In each site's Identity section (
/admin/sites/{site}/identity), a platform administrator sets Canonical link: This site, The content's origin site (the default) or None (Sites adds no canonical link). Region takes a two-letter country code, likeGBfor Hydrion UK andUSfor Hydrion US. What a region changes in both links: Canonical link and hreflang. - To let editors change both links for one content item, add a meta tags field to its content type (Change them for one content item).
Settings without a form¶
sites_metatag.settings has no form. Its defaults follow Google's guidance on
canonical and localized pages; change a key with Drush or in settings.php:
| Key | Default | Decides |
|---|---|---|
canonical.across_regions |
false |
Whether The content's origin site may name a site of another Region. Off, a site with a region names a site of its own region, or itself (The canonical link). |
canonical.own_variants |
true |
Whether a site that shows its own version of the content names itself. |
hreflang.canonical_pages_only |
true |
Whether only a page whose canonical link names itself carries alternates. |
hreflang.minimum |
2 |
The fewest alternates a page carries; below it, none. |
hreflang.x_default |
true |
Whether an x-default alternate names the page on the content's origin site. |
Last updated 2026-10-16