Skip to content
SEO Extensions

Hreflang Manager for Magento 2

Map equivalent Magento product, category and CMS pages across language or regional store views, then emit hreflang alternates with an optional x-default.

  • Free
  • Themes listed: Hyvä + Luma
Free $0.00, in stock
Check requirementsSee the versions and themes listed for this package. Details Ask about setupInclude the package name and your Magento and PHP versions. Ask
$0.00
In stock
SKU
panth-hreflang
Links
composer require mage2kishan/module-hreflang
SKU
panth-hreflang
  • Package requirementsRead the source documentation
  • Developer profileView Upwork profile
  • Themes listedHyvä + Luma
  • PHP versions listed8.1, 8.2, 8.3, 8.4
  • Installation questionsDiscuss your store setup

What it does for your store

The main features, as listed in the module documentation.

  • Locale alternate groups

    Associate equivalent product, category or CMS pages across store views.

  • Store and website scope

    Choose same-website or cross-website alternate resolution.

  • CMS relation options

    Resolve CMS equivalents by page ID, identifier or explicit group mapping.

  • Group diagnostics

    Review configured locales, duplicate membership and default selection before checking final output.

Installation

Example commands from the Magento root. Follow the package instructions and your staging and deployment process.

  1. 1Check the releaseMatch Magento, PHP, theme and dependency requirements.
  2. 2Install on stagingReview Composer changes and follow the package instructions.
  3. 3Configure and verifyUse the documented settings and test the affected features.
magento-root
$ composer require mage2kishan/module-hreflang
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
$ bin/magento setup:static-content:deploy -f
$ bin/magento cache:clean

Listed requirements

These are the details supplied in this listing. Confirm the selected release supports your Magento edition, PHP and storefront.

Magento versions listed2.4.6, 2.4.7, 2.4.8
PHP versions listed8.1, 8.2, 8.3, 8.4
Themes listedHyvä, Luma
Composer packagemage2kishan/module-hreflang

Read package requirements and license

Documentation

Product details and setup guidance. Check the package repository for release-specific instructions.

Overview

Panth Hreflang connects equivalent pages intended for different languages or regions. You define the relationship between store views so a product, category or CMS page can publish its appropriate locale alternatives.

What you get

  • Product, category and CMS alternate groups.
  • Website or cross-website scope and CMS matching options.
  • Optional x-default output for a resolved set.
  • Admin group management and configuration diagnostics.

Magento 2 Hreflang

This page describes mage2kishan/module-hreflang 1.0.27. Hreflang describes locale variants of the same content. It does not translate text or establish a relationship between unrelated topic pages. Google's localized-page guidance explains self references, return links and locale codes.

Admin configuration

Features

The server-rendered head block resolves alternates for mapped entities. Configured URLs and locale values still need editorial review. Group diagnostics are useful checks, not proof that every target returns the correct status, canonical and equivalent content.

Usage

Start with a small representative set of pages or records. Check the enabled and disabled states, store scope and interaction with existing SEO output before widening the change.

Storefront output

The head template prints alternate links from the resolver. The example below illustrates localized equivalents; replace the placeholder store URLs with absolute published URLs. Check each group member for the same intended alternate set, including self and return links.

<link rel="alternate" hreflang="en-GB" href="[UK store URL]/shirt.html" />
<link rel="alternate" hreflang="de-DE" href="[DE store URL]/hemd.html" />
<link rel="alternate" hreflang="x-default" href="[UK store URL]/shirt.html" />

Admin behaviour

The group form manages members and removes deleted member rows when saved. Diagnostics check configured defaults, member counts, store locales, duplicate locales and whether member store views have hreflang enabled.

Indexer

The panth_seo_hreflang indexer can fill hreflang_payload in the resolved table supplied by the optional Advanced SEO package. It returns without that table or column. The storefront can resolve alternates directly, so Advanced SEO is a suggestion rather than a required Composer dependency.

Templates

The head template is Panth_Hreflang::head/hreflang.phtml. Theme overrides must retain escaped URL and locale output. Server-rendered output does not replace testing with the store's theme and head-tag customizations.

Changelog

Read the package changelog before an upgrade. Compare the entry with the exact installed version and source reference.

Compatibility

The inspected release declares PHP ~8.1.0||~8.2.0||~8.3.0||~8.4.0 and specific Magento component constraints in its Composer manifest. These are dependency requirements. They do not establish that every PHP, Magento edition, patch release and theme combination has been tested. Match your platform to Adobe's system requirements and validate the package on a staging copy with your installed extensions.

Requirements

Composer requires mage2kishan/module-core:^1.0 and the Magento components listed in this release's composer.json. Resolve the full project dependency set before installation. Check your PHP version, deployment mode and store scope, and back up the application and database before a change.

Installation

Install on a development or staging copy first. The Composer package token below identifies this module; choose the version you intend to deploy. Run setup, compilation and static asset steps according to your deployment mode and project process. Adobe's extension installation guide explains the release workflow. The commands shown here are examples to review for your environment.

composer require mage2kishan/module-hreflang
bin/magento module:enable Panth_Core Panth_Hreflang
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean
bin/magento module:status Panth_Hreflang

Configuration

Choose the intended store scope before editing settings. Review the release-specific sections below, enable one capability at a time and compare the saved values with the resulting storefront or generated file.

Hreflang

Configure Enabled, Emit x-default, website scope and the CMS relation method under Panth Extensions > Hreflang. Self-Referencing x-default on Unmapped Pages defaults to No. Keep fallback behaviour deliberate; an unmapped page does not automatically need an alternate.

Hreflang groups

Create a group for equivalent pages and add the relevant store view, entity ID, locale, URL and default choice. Use the actual language and optional region, such as en-GB. Do not use a country code alone or map two unrelated pages because they share a keyword.

Hreflang mapping grid Edit hreflang group form

Uninstallation

Review installed dependants before removing this package. Back up the database, configuration and generated files first. Disabling or removing the code does not by itself remove every stored setting or table. Check the release README for retained data and use a reviewed removal plan.

bin/magento module:disable Panth_Hreflang
composer remove mage2kishan/module-hreflang
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:clean

License

This inspected release is free and open source under the MIT License. Keep the copyright and permission notice when redistributing it. See the release licence. The licence does not establish a support term, a refund promise or future-version compatibility.

Developer Notes

The module is Panth_Hreflang. Extend Api/HreflangResolverInterface when a custom relationship source is needed. The separate XML Sitemap package can consume locale alternates when its integration is enabled. Keep HTML and sitemap mappings consistent.

More information
Module Category SEO & Indexing
Best For Mid-Market
Kishan Savaliya

Questions before you install?

Send me your composer.json and I will check for conflicts first. Free. Installation is +$45, custom work is quoted first.

Ask on Discord