The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
604 Ready
486 Need Help
🏆 Leaderboard
Actively Maintained v1.3.0

MageOS Hreflang for Magento 2

mage-os/module-hreflang

Adds hreflang locale identification for CMS, product, and category page URLs, associating equivalent pages across store views to improve international SEO.

44
Downloads
Below average
2
GitHub Stars
Below average
Today
Last Release
0
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
53 warnings
L1 PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.3.0 on Magento 2.4.9
Jun 13, 2026
v1.2.0 on Magento 2.4.9
Jun 1, 2026

Share This Module's Status

MageOS Hreflang for Magento 2 Magento compatibility status badge

README

Loaded from GitHub

MageOS Hreflang Module for Magento

🚀 Features

This module adds locale identification management for urls

  • cms pages
  • product pages
  • category pages

🔧 Installation

You can install this module adding it on app/code folder or with composer.

composer require mage-os/module-hreflang

Then you'll need to enable the module and update your database and files:

php bin/magento module:enable MageOS_Hreflang
php bin/magento setup:upgrade
php bin/magento setup:di:compile
CONFIGURATION

You must enable the module from "Stores > Configurations > Web > Search Engine Optimization" section adding your hreflang configuration for store view scope. CMS pages are related to each other via the meta_identifier attribute (if filled in). See the "Search Engine Optimization > Hreflang association identifier" section for each page.

EXTENSION

You can add multiple controllers/url retrievers configurations mapping other scenarios trough Dependency injection. Create a new module with MageOS_Hreflang inside module.xml sequence, then add new retrievers through di.xml:

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="MageOS\Hreflang\Model\Retriever\HreflangService">
        <arguments>
            <argument name="retrievers" xsi:type="array">
                <item name="other_controller_path" xsi:type="object">Vendor\Module\Model\Retriever\OtherScenarioHreflangRetriever</item>
            </argument>
        </arguments>
    </type>
</config>

🤝 Changelog

Please see CHANGELOG for more information on what has changed recently.

📄 License

The MIT License (MIT). Please see License File for more information.

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.