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
- Configure in development/staging first
- Enable debug mode
- Test with
?show-alternate=1on key pages:- Homepage
- Popular product
- Main category
- Key CMS page
- Run self-test tool
- Review debug logs for errors
- Verify all expected stores appear in hreflang tags
- Disable debug mode
- Deploy to production
After Going Live
- Submit sitemap to Google Search Console
- Monitor International Targeting report
- Check for hreflang errors in Search Console
- Monitor organic traffic by language/region
- 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:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team