Hreflang Language Tags extension icon

Hreflang Language Tags for Magento 2

Add correct hreflang tags across store views so search engines serve the right language and region.

SEO & Content Magento 2.4.x Open Source & Adobe Commerce Adobe Marketplace approved $39 USD

Why choose Hreflang Language Tags?

Hreflang Language Tags adds hreflang tags to products, categories, CMS pages and the home page so search engines show visitors the right language or country version of your store. Each store view gets its own language code, x-default is supported, and URL rewrites are resolved per store so the alternate links are correct.

Hreflang Language Tags: Overview (screenshot 1 of 6)Hreflang Language Tags: Configuration (screenshot 2 of 6)Hreflang Language Tags: Product pages (screenshot 3 of 6)Hreflang Language Tags: Category pages (screenshot 4 of 6)Hreflang Language Tags: CMS pages (screenshot 5 of 6)Hreflang Language Tags: Homepage (screenshot 6 of 6)
1 / 6

Key features

  • Automatic tag injection
  • Four page types supported
  • x-default tag support
  • Per-store-view language codes
  • URL rewrite resolution
  • Homepage handling
  • Multi-website and multi-store-group compatible
  • Request-level caching
  • Full-page cache compatible
  • Scope-aware configuration
  • Zero core modifications
  • Zero runtime dependencies

At a glance

Module nameMage2Expert_HrefLang
Composer packagemage2expert/module-hreflang
SettingsStores › Configuration › Magento Expert › HrefLang Tags (7 options)
Per store view settingsYes
APINo custom endpoints (uses Magento's standard APIs)
PHP8.1, 8.2, 8.3, 8.4, 8.5

Installation

After purchasing on the Adobe Commerce Marketplace, install it with Composer using your Marketplace access keys:

composer require mage2expert/module-hreflang
bin/magento module:enable Mage2Expert_HrefLang
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

Skip setup:di:compile and static-content:deploy if your store runs in developer mode.

Configuration reference

All 7 options under Stores › Configuration › Magento Expert › HrefLang Tags, grouped as they appear in the admin.

General Settings 2
SettingDescription
Enable HrefLang TagsEnable or disable hreflang alternate link tags site-wide.
X-Default Store ViewSelect the store view to use for the x-default hreflang tag. x-default indicates the page for users who do not match any specific language. Select "None" to auto-use the first active store.
Page Type Settings 4
SettingDescription
Enable for Product PagesRender hreflang tags on catalog product view pages.
Enable for Category PagesRender hreflang tags on catalog category view pages.
Enable for CMS PagesRender hreflang tags on CMS content pages (excluding the homepage).
Enable for HomepageRender hreflang tags on the homepage. Each store's base URL is used as the alternate.
Store Language Code 1
SettingDescription
Language Code (hreflang)ISO 639-1 language code, optionally with ISO 3166-1 region (e.g. en, en-US, en-GB, fr-FR, de-DE, zh-Hans-CN). Must be set per Store View for hreflang tags to appear.

Frequently asked questions

How much does Hreflang Language Tags cost?
Hreflang Language Tags costs $39 USD as a one-off purchase on the Adobe Commerce Marketplace.
Which Magento and PHP versions are supported?
Magento Open Source and Adobe Commerce 2.4.x. It is developed and tested on Magento 2.4.8, and supports PHP 8.1, 8.2, 8.3, 8.4, 8.5.
Where do I configure Hreflang Language Tags?
In the Magento admin under Stores › Configuration › Magento Expert › HrefLang Tags. It has 7 options, grouped into 3 sections.
Can I switch it off without uninstalling it?
Yes. Set "Enable HrefLang Tags" to No under Stores › Configuration › Magento Expert › HrefLang Tags. Your settings and data are kept.
Can the settings differ per store view?
Yes. Many options can be set per website and store view, so multi-store and multi-language setups can behave differently.
Can it be customised for my store?
Yes. As the developer of Hreflang Language Tags, I can adapt it to your workflow or build related features. Email me with what you need.
Available for new projects

Have a Magento project in mind?

Tell me about your store and what you need. I reply to every enquiry within one business day.

Adobe Certified Expert

Adobe Commerce Developer certification, verified on Credly.

15+ years of Magento

From Magento 1 to Magento 2.4.x, Adobe Commerce and Hyvä.

62 Marketplace extensions

Each one reviewed and approved by Adobe.