Skip directly to page content
b13 GmbH

Hauptstätter Str. 59
70178 Stuttgart
Germany
+49 (0) 711 460 589 70 [email protected]
Graphic featuring a stylized link icon surrounded by overlapping shapes, set against a blue background with a gradient.

Installation

TYPO3 Extension “Hreflang Multisite”
Version 2.5.0 (30 Nov 2026)

Chapters of this Documentation

Requirements

  • TYPO3 v13.4 LTS or v14.3 LTS
  • PHP 8.2 to 8.5—composer.json requires ^8.2, ext_emconf.php declares 8.2.0 to 8.5.99, and the CI matrix covers 8.2 through 8.5
  • The system extensions info and seo—pulled in automatically as dependencies

Before you install, check When This Applies. If all your languages live in one page tree, TYPO3 already renders correct hreflang tags and this extension adds nothing.

1. Install the Package

composer require b13/hreflang-multisite

2. Add the Configuration

There are two ways in, and they differ only in where the defaults come from.

With Site Sets (Recommended)

The extension ships a site set named b13/hreflang-multisite. Add it to your site's config.yaml:

dependencies:
  - b13/hreflang-multisite

That brings the defaults. You then only add your own rootpage-sets on top.

Without Site Sets

Include the shipped PageTsConfig manually—it is not loaded automatically:

@import 'EXT:hreflang_multisite/Configuration/TSConfig/PageTsConfig.typoscript'

Or set every option yourself; see The Complete Block.

Put the configuration in a file and include it on every root page, so the root pages of one group cannot drift apart.

3. Define at Least One Group

plugin.tx_hreflang_multisite.rootpage-sets {
    10 = 1,13
    20 = 11,31
}

Nothing works until this exists. Without a group, the page set field is hidden from the page properties and no set can be created.

Each key defines one group of root pages that may be linked together. A root page that appears in no group cannot be linked at all.

4. Decide Where Records Are Stored

plugin.tx_hreflang_multisite.storagePid = 98

If unset, page set records are stored on the page currently being edited. The records are hidden from the list module either way, so this decides where they live, not whether editors see them.

5. Turn On the Configuration Check

plugin.tx_hreflang_multisite.debug = 1

Despite the name this is not a developer switch. It is the only backend surface that surfaces duplicate hreflang codes across a root page group, and it defaults to 0. See Verifying a Setup.

Updating

Updates need no database migration of their own; run the database compare as after any extension update.

Up to 2.4.0, copying or translating a page could leave relations in the page-set table that belong to no set, and copying a page could copy the page set stored on it. Leftover relations are ignored when the tags are rendered, until a new set happens to get the uid they name; it then starts with those pages. Remove them once after updating:

vendor/bin/typo3 hreflang:cleanup-relations --dry-run
vendor/bin/typo3 hreflang:cleanup-relations
vendor/bin/typo3 referenceindex:update

The first call only reports what the second removes. Both list pages that belong to more than one set: open the set of each such page in the editor and remove the page from the set it does not belong to. That is where a copied set, or a leftover relation a set has already picked up, shows.

Going Live

  • rootpage-sets defines every group that editors need
  • The configuration is included on all root pages, not just one
  • Language and region codes are unique inside each group—the check under debug reports duplicates
  • Every set has an x-default and it points at a page inside the set
  • debug is set to 1 if editors should see the check
  • Check the rendered <link rel="alternate"> tags on a real page, on one page per root page. This is the only step that shows what visitors and search engines actually get. Expect one tag per language and region in the set, plus x-default as the last entry