Alternate Hreflang Tags

Version v2.4.0
Platform Magento 2
Last Updated 14 January 2026

Configure Hreflang Link Groups for Products in Magento 2

New in v2.3.0: This feature extends the existing CMS page grouping functionality to products and categories, allowing you to manually override automatic hreflang linking.

This guide explains how to use Alternate Link Groups in the Alternate Hreflang Extension to manually link products or categories across stores when automatic linking doesn't fit your needs.

How Automatic Linking Works

By default, the module automatically links entities across stores:

Entity Type Automatic Linking Method
Products Same product ID/SKU across store views in the same targeting group
Categories Same category ID across store views in the same targeting group
CMS Pages No automatic linking (always requires manual grouping)

Targeting groups are configured in: Stores > Configuration > Magmodules > Alternate Hreflang > Targeting Settings

Use manual Alternate Link Groups when:

  • Different products should link together - e.g., "Blue T-Shirt" (US) should link to "T-Shirt Bleu" (FR) which are different products
  • Different categories should link together - e.g., "Clothing" (US) should link to "Vêtements" (FR) which are different categories
  • Products/categories exist only in certain stores - linking regional variants that don't share the same ID
  • Override automatic linking - when the default ID-based linking isn't correct for your use case

Products

  1. Navigate to Catalog > Products
  2. Edit any product
  3. Scroll to Hreflang Override section
  4. Find the Alternate Link Group field

Categories

  1. Navigate to Catalog > Categories
  2. Select any category
  3. Scroll to Hreflang Override section
  4. Find the Alternate Link Group field

Using the Dropdown

The dropdown contains two sections:

Actions

  • Use automatic linking (default) - Product/category uses standard ID-based linking
  • Create new group - Shows input field to create a new group name

Existing Groups

Lists all previously created group names. Select one to add the product/category to that group.

Step-by-Step Example: Products

Scenario

You have different products in each store that should be treated as translations:

Store Product SKU
US (en-us) Blue Running Shoes SHOE-US-001
France (fr-fr) Chaussures de Course Bleues SHOE-FR-001
Germany (de-de) Blaue Laufschuhe SHOE-DE-001

These are different products (different SKUs) but represent the same item in different markets.

Solution

Step 1: Create group on first product

  1. Edit "Blue Running Shoes" (US store)
  2. Go to Hreflang Override section
  3. Select Create new group from dropdown
  4. Enter group name: running-shoes-blue
  5. Save product

Step 2: Add other products to the group

  1. Edit "Chaussures de Course Bleues" (FR store)
  2. Go to Hreflang Override section
  3. Select Running-shoes-blue from Existing Groups
  4. Save product

Repeat for German product.

Result:

All three products now link to each other with hreflang tags:

<link rel="alternate" hreflang="en-us" href="https://example.com/blue-running-shoes" />
<link rel="alternate" hreflang="fr-fr" href="https://example.fr/chaussures-course-bleues" />
<link rel="alternate" hreflang="de-de" href="https://example.de/blaue-laufschuhe" />

Step-by-Step Example: Categories

Scenario

Different category structures per store:

Store Category ID
US (en-us) Men's Apparel 42
France (fr-fr) Vêtements Homme 156
Germany (de-de) Herrenkleidung 89

Different category IDs, but same conceptual category.

Solution

  1. Edit each category
  2. Select or create group: mens-clothing
  3. Save

All three categories now have hreflang tags linking to each other.

Group Naming Best Practices

Good Names

  • mens-clothing - descriptive
  • running-shoes-blue - specific product type + variant
  • electronics-smartphones - category hierarchy
  • homepage - standard page type

Avoid

  • group1, test - not descriptive
  • english-product - language in name (group is for ALL languages)
  • Spaces or special characters - use hyphens

Important Notes

Overriding Automatic Linking

When you assign a product/category to an Alternate Link Group:

  • Automatic ID-based linking is disabled for that entity
  • Only entities in the same group will link to each other
  • Entities without a group continue using automatic linking

Store View Scope

The Alternate Link Group field is store view scoped:

  • Set different values per store view if needed
  • Typically, you'll set the same group name across all store views for the same logical entity

Clearing Groups

To remove a product/category from a group and return to automatic linking:

  1. Edit the entity
  2. Select Use automatic linking (default)
  3. Save

Verifying Your Setup

Using Debug Mode

  1. Enable debug mode in module configuration
  2. Visit the product/category page with ?show-alternate=1
  3. Verify the hreflang tags show correct alternate URLs

Example:

https://example.com/blue-running-shoes?show-alternate=1

Common Issues

Tags not appearing:

  • Check that all grouped entities have the exact same group name
  • Verify entities are assigned to correct store views
  • Clear cache after changes

Wrong products/categories linked:

  • Check for typos in group names
  • Verify you selected the correct existing group

Relationship with CMS Pages

CMS pages have always required manual grouping (they have no automatic linking). The same Alternate Link Group concept now works for products and categories too.

Migration from Automatic Linking

If you're currently using automatic linking and want to switch to manual groups:

  1. Identify entities that need manual grouping
  2. Create naming scheme for your groups
  3. Update entities one group at a time
  4. Test with debug mode after each group
  5. Clear cache to see changes

Summary

Feature Automatic Linking Alternate Link Groups
Based on Same ID/SKU Group name
Setup None required Manual assignment
Use case Standard multi-store Different IDs, same content
Products Default behavior Override when needed
Categories Default behavior Override when needed
CMS Pages Not available Always required

Need More Help?

Documentation:

Support:

Article Updated:
star star star star star
star star star star star
Alexandru-Manuel Carabus
Magmodules sets the bar for Magento module quality and support—we check their catalog first for client feature requests, and they’re our first choice for licenses.
Google 11 Nov 2025
star star star star star
star star star star star
Matt Austin
Possibly the fastest support response times of any Magento Extension vendor. Great extensions too!
Google 09 Sep 2025
star star star star star
star star star star star
Jan Privé
Dankzij de heldere uitleg en snelle reactie van Magmodules kon mijn vraag, en dus mijn Magento-probleem, binnen enkele uren worden beantwoord. Doeltreffend, zonder moeilijke termen, gewoon zo als het zou moeten zijn.... Bedankt!
Google 05 Sep 2025
star star star star star
star star star star star
Denis Metzler
To evaluate a provider, it is not enough to consider only the product offered, but also its after-sales service, such as support and troubleshooting. Magmodules has been extremely satisfactory at all levels on multiple occasions and sets the bar at the top when comparing the competition.
Google 02 Sep 2025
star star star star star
star star star star star
Bleijenberg winkelinrichting en materialen
Goed bereikbaar, reageren snel en denken oplossingsgericht. Een aanrader.
Google 30 Jul 2025
star star star star star
star star star star star
Patrick Verduijn
Magmodules biedt plugins aan die van hoge kwaliteit zijn tegen een goede prijs, waar dit bedrijf in uitblinkt is de bereidheid om de zeldzame feedback & problemen met de plugins te willen onderzoeken, mee te willen denken in het debuggen van problemen en goede oplossingen toe te passen. In mijn decennium ervaring met Magento & 3th parties is Magmodules absoluut een uniqum binnen de markt.
Google 25 Jul 2025
star star star star star
star star star star star
Erik de Groot
Magemodules heeft hele sterke Magento extensies en een proactieve support. Al jaren heel erg tevreden over jullie service en producten!
Google 18 Jul 2025
star star star star star
star star star star star
René Zeuner
We are using the Mollie Magento extension from Magmodules. It works excellently without flaws. Very fast, competent and friendly support. Thanks!
Google 30 Jun 2025
star star star star star
star star star star star
R. U.
Erg goed team, reageren snel en duidelijk en hebben met toegang tot onze database erg goed geholpen (eigenlijk een gratis customization).
Google 18 Jun 2025
star star star star star
star star star star star
Hugo de Groot
Uitstekende support! Wij gebruiken o.a. de Rich Snippets Suite extensie voor onze Magento 2 webshop (Hyvä) en hadden een specifieke vraag over structured data op PLP-pagina’s. Binnen no-time kregen we een inhoudelijk en duidelijk antwoord. Zeer prettig contact en goed onderbouwde uitleg. Absoluut een betrouwbare partner voor Magento-extensies!
Google 13 Jun 2025