Best Practices

These are the recommended ways to configure the Alternate Hreflang Extension based on what we've seen work well. We've included a few real-world examples - simple multi-language stores, B2B vs B2C setups, multi-brand configurations - so you can see how others are using it. There's also a list of common mistakes people make and how to avoid them.

Recommended configurations and common pitfalls.

General Guidelines

Do's

✅ Enable canonical URL integration to prevent duplicate content issues
✅ Use region-specific language codes (en-us, en-gb) when targeting different markets
✅ Group only store-views that share the same products/categories
✅ Test configuration with ?show-alternate=1 before going live
✅ Enable NoIndex handling if using noindex directives
✅ Regenerate sitemap after configuration changes
✅ Consult with your SEO partner for complex setups
✅ Run self-test after major configuration changes
✅ Keep language codes consistent (lowercase with hyphen)
✅ Clear cache after configuration changes

Don'ts

❌ Don't add hreflang to pages with noindex directive
❌ Don't mix different product catalogs in the same group
❌ Don't over-complicate x-default (skip it for simple setups)
❌ Don't use inconsistent language code formatting
❌ Don't forget to disable debug mode in production
❌ Don't change store groups frequently (impacts SEO)
❌ Don't enable page types that aren't translated
❌ Don't skip testing after configuration changes


Common Scenarios

Scenario 1: Simple Multi-Language Store

Use case: Single store with multiple languages, all sharing the same product catalog.

Example: International e-commerce site selling to Europe

Configuration:

Targeting Settings:

  • English (US) → en-us → Group 1
  • French → fr-fr → Group 1
  • German → de-de → Group 1
  • Spanish → es-es → Group 1

Page Types:

  • Enable on Homepage: Yes
  • Enable on Product Pages: Yes
  • Enable on Category Pages: Yes
  • Enable on CMS Pages: Yes

Canonical Integration:

  • Enable Hreflang Only on Canonical URLs: Yes

NoIndex Handling:

  • Enable: No (all content should be indexed)

X-Default:

  • Not configured (skip for simple setup)

Result: All products/categories link across all 4 languages. Search engines show the correct language to each user.


Scenario 2: Multi-Regional English Store

Use case: Same language but different regions with pricing/shipping differences.

Example: Global store targeting US, UK, Australia, Canada

Configuration:

Targeting Settings:

  • United States → en-us → Group 1
  • United Kingdom → en-gb → Group 1
  • Australia → en-au → Group 1
  • Canada → en-ca → Group 1

Page Types:

  • Enable on Homepage: Yes
  • Enable on Product Pages: Yes
  • Enable on Category Pages: Yes
  • Enable on CMS Pages: Yes

Canonical Integration:

  • Enable Hreflang Only on Canonical URLs: Yes

X-Default:

  • Target Store-View: United States (en-us)

Result: Search engines serve the correct regional version based on user location, even though language is the same.


Scenario 3: Multiple Product Catalogs

Use case: Separate stores for different product lines or brands that don't share inventory.

Example: Fashion company with footwear and apparel divisions

Configuration:

Targeting Settings:

Group 1 - Footwear:

  • Shoes EN → en-us → Group 1
  • Shoes FR → fr-fr → Group 1
  • Shoes DE → de-de → Group 1

Group 2 - Apparel:

  • Clothing EN → en-us → Group 2
  • Clothing FR → fr-fr → Group 2
  • Clothing DE → de-de → Group 2

Page Types:

  • Enable on Homepage: Yes
  • Enable on Product Pages: Yes
  • Enable on Category Pages: Yes
  • Enable on CMS Pages: No (different content per division)

Canonical Integration:

  • Enable Hreflang Only on Canonical URLs: Yes

Result: Footwear products only link to other footwear stores. Apparel products only link to other apparel stores. No cross-linking between divisions.


Scenario 4: B2C and B2B Stores

Use case: Separate customer-facing and business stores with different products and pricing.

Example: Manufacturer with retail and wholesale channels

Configuration:

Targeting Settings:

Group 1 - B2C:

  • Retail EN → en-us → Group 1
  • Retail FR → fr-fr → Group 1

Group 2 - B2B:

  • Wholesale EN → en-us → Group 2
  • Wholesale FR → fr-fr → Group 2

Page Types:

  • Enable on Homepage: Yes
  • Enable on Product Pages: Yes
  • Enable on Category Pages: Yes
  • Enable on CMS Pages: Yes

Canonical Integration:

  • Enable Hreflang Only on Canonical URLs: Yes

Result: B2C products link only to other B2C stores. B2B products link only to other B2B stores.


Scenario 5: Enterprise with Sitemap Integration

Use case: Large catalog with automated sitemap generation for faster search engine discovery.

Example: Major retailer with 10,000+ products in multiple languages

Requirements: Magmodules Sitemap and Robots Module for XML sitemap integration and NoIndex attribute handling.

Configuration:

Targeting Settings:

  • EN → en-us → Group 1
  • FR → fr-fr → Group 1
  • DE → de-de → Group 1
  • IT → it-it → Group 1
  • ES → es-es → Group 1

Page Types:

  • Enable on Homepage: Yes
  • Enable on Product Pages: Yes
  • Enable on Category Pages: Yes
  • Enable on CMS Pages: Yes

Canonical Integration:

  • Enable Hreflang Only on Canonical URLs: Yes

NoIndex Handling:

  • Enable: Yes
  • Product Attribute: mm_meta_robots
  • Category Attribute: mm_meta_robots
  • CMS Column: mm_meta_robots

Third Party:

  • Enable: Yes
  • Sitemap Products: Yes
  • Sitemap Categories: Yes
  • Sitemap CMS Pages: Yes
  • Sitemap Homepage: Yes

Result: Complete hreflang implementation with XML sitemap integration for efficient search engine crawling. NoIndex pages are excluded automatically.


Language Code Best Practices

Use Region-Specific Codes

Better:

en-us (United States)
en-gb (United Kingdom)
en-au (Australia)

Less specific:

en (English - any region)

Why: Regional codes help search engines target the right audience, especially when content/pricing differs by region.


Common Language Codes

Code Language Region
en-us English United States
en-gb English United Kingdom
en-au English Australia
en-ca English Canada
fr-fr French France
fr-ca French Canada
de-de German Germany
de-at German Austria
es-es Spanish Spain
es-mx Spanish Mexico
it-it Italian Italy
nl-nl Dutch Netherlands
pt-pt Portuguese Portugal
pt-br Portuguese Brazil

Store Grouping Strategy

When to Use the Same Group

✅ Stores share the same products
✅ Stores share the same categories
✅ Content is translated/localized but structurally the same
✅ Different languages/regions of the same business

When to Use Different Groups

✅ Different product catalogs
✅ Different brands or business units
✅ B2B vs. B2C
✅ Products/categories are NOT shared
✅ Completely separate businesses

Example Grouping:

✅ Good:
Group 1:
- EN Store (en-us) - Sells shoes in English
- FR Store (fr-fr) - Sells shoes in French
- DE Store (de-de) - Sells shoes in German

Group 2:
- EN Store (en-us) - Sells clothing in English
- FR Store (fr-fr) - Sells clothing in French
- DE Store (de-de) - Sells clothing in German

❌ Bad:
Group 1:
- EN Shoes (en-us)
- FR Clothing (fr-fr)
- DE Shoes (de-de)

Testing Workflow

Initial Setup

  1. Configure in development/staging first
  2. Enable debug mode
  3. Test with ?show-alternate=1 on key pages:
    • Homepage
    • Popular product
    • Main category
    • Key CMS page
  4. Run self-test tool
  5. Review debug logs for errors
  6. Verify all expected stores appear in hreflang tags
  7. Disable debug mode
  8. Deploy to production

After Going Live

  1. Submit sitemap to Google Search Console
  2. Monitor International Targeting report
  3. Check for hreflang errors in Search Console
  4. Monitor organic traffic by language/region
  5. Review crawl logs for efficiency

Regular Maintenance

  • Run self-test quarterly
  • Check for module updates monthly
  • Review hreflang errors in Search Console monthly
  • Audit configuration when adding new stores
  • Test after major Magento updates

Performance Optimization

For Large Catalogs

  • Enable only necessary page types
  • Use sitemap integration for faster discovery (requires Sitemap and Robots Module)
  • Monitor sitemap generation time
  • Consider sitemap index files for 10,000+ products
  • Enable compression (gzip) on sitemaps

For High-Traffic Sites

  • Disable debug logging in production
  • Use full-page cache for hreflang tags
  • Monitor server resources during sitemap generation
  • Generate sitemaps during off-peak hours

Common Mistakes

Mistake: Enabling all page types by default

Why it's wrong: Adds hreflang to untranslated pages, creating noise

Correct approach: Only enable page types that are actually translated/localized


Mistake: Not using canonical integration

Why it's wrong: Hreflang tags appear on duplicate/filtered URLs, causing duplicate content issues

Correct approach: Always enable "Hreflang Only on Canonical URLs"


Mistake: Using inconsistent language codes

Why it's wrong: en_US, en-us, EN-US are treated differently by search engines

Correct approach: Always use lowercase with hyphen: en-us


Mistake: Over-complicating x-default

Why it's wrong: Unnecessary complexity for simple setups, can introduce errors

Correct approach: Skip x-default for straightforward multi-language stores


Mistake: Not testing before going live

Why it's wrong: Errors in hreflang can negatively impact SEO

Correct approach: Always test with debug mode and run self-test before production


Mistake: Mixing product catalogs in same group

Why it's wrong: Creates links between unrelated products

Correct approach: Use separate groups for different catalogs


SEO Considerations

Consult Your SEO Partner

While this module handles the technical implementation, strategic decisions should involve your SEO team:

  • X-default strategy
  • Language/region targeting approach
  • Store grouping strategy
  • Which page types to enable
  • International content strategy

Monitor Performance

Use Google Search Console to:

  • Check for hreflang errors
  • Monitor international traffic
  • Review language/region distribution
  • Identify indexing issues
  • Track crawl efficiency

Best Timing for Changes

  • Deploy during low-traffic periods
  • Allow 2-4 weeks for search engines to process changes
  • Monitor Search Console for errors after changes
  • Don't make frequent changes to grouping/codes

Need More Help?

Documentation:

Support:

Created:
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 27 days ago
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