Configure the Multi-Language Alternate Hreflang extension
Here's where you'll find all the settings for the Alternate Hreflang Extension. This guide explains what each option does and when you'd want to use it. We've organized it the same way as the admin panel (General, Targeting, Configuration, etc.) so you can quickly find what you need. Some settings include recommended values for common setups.
All configuration options explained.
Location: Stores → Configuration → Magmodules → Alternate Hreflang
General
Enable Extension
Turn the module on or off. Enable this after you've configured your store targeting and page types.
Version Check
Displays the current module version and checks for available updates. Use this to stay up-to-date with the latest features and bug fixes.
Targeting Settings
Store Targeting
Configure which store-views should be linked together with hreflang tags.
How it works:
- All stores in the same Group number will link to each other
- Stores in different groups will NOT link to each other
- Each store needs a language code (e.g.,
en-us,fr-fr,de-de)
When to use multiple groups:
- You have separate product catalogs (e.g., shoes vs. clothing)
- Different brands or business units
- Products/categories are not shared between stores
Language code format:
- Use lowercase with hyphen:
en-us(noten_US) - Be specific with regions when targeting different markets:
en-us,en-gb,en-au - Can use language-only codes for broader targeting:
en,fr,de
Recommended:
- Use region-specific codes (
en-us) for better targeting - Group only stores that share the same content/products
- Keep language codes consistent across your site
Example:
Group 1: International Store
- English (US) → en-us → Group 1
- French → fr-fr → Group 1
- German → de-de → Group 1
Group 2: B2B Store
- English (US) → en-us → Group 2
- German → de-de → Group 2
X-Default Configuration
Set a fallback page for users whose language/region isn't specifically targeted. This is optional and not needed for most setups.
Two options:
- Target a CMS Page - Direct users to a language/country selector page
- Target a Store-View - Use a specific store (e.g., English US) as the default
When to use:
- You have a language selector landing page
- You serve customers globally without dedicated language versions
- Complex multi-regional targeting where no single store is primary
When to skip:
- Simple multi-language setup (e.g., EN + FR + DE)
- All target markets have dedicated store-views
- You want to keep configuration simple
Recommended:
- For most stores: Don't use x-default - modern search engines handle this well
- If needed: Use your primary market store-view as x-default
- Consult with your SEO partner for complex international setups
Alternate Hreflang Configuration
Page Types
Choose which page types should have hreflang tags.
Enable on Homepage
Add hreflang tags to your store homepage.
When to enable:
- Homepage content differs between store-views
- You have localized homepages for different languages
Enable on Product Pages
Add hreflang tags to product detail pages.
When to enable:
- Products are available in multiple store-views
- Product content is translated/localized
Enable on Category Pages
Add hreflang tags to category pages.
When to enable:
- Categories are shared across store-views
- Category content is translated/localized
Enable on CMS Pages
Add hreflang tags to CMS pages (About Us, Terms, etc.).
When to enable:
- CMS pages are translated and available in multiple languages
- Pages share the same identifier across stores
Canonical URL Integration
Enable Hreflang Only on Canonical URLs
Only add hreflang tags to pages with self-referential canonical URLs. This prevents tags from appearing on duplicate/filtered pages.
How it works:
- Page with canonical pointing to itself: Hreflang tags added ✅
- Page with canonical pointing elsewhere: No hreflang tags ❌
Example:
Product page: https://example.com/shoes
Filtered page: https://example.com/shoes?size=42
The filtered page has canonical pointing to the main page,
so hreflang only appears on https://example.com/shoes
Recommended:
- Enable this to prevent duplicate content issues
- Ensures hreflang tags only on primary/canonical pages
- Follows SEO best practices
NoIndex Handling
Prevent hreflang tags from being added to pages marked with noindex directive. This avoids sending conflicting signals to search engines.
Enable NoIndex Handling
When enabled, pages with a noindex directive will not have hreflang tags.
Why this matters:
- Hreflang says "index this alternate version"
- NoIndex says "don't index this page"
- These conflicting signals confuse search engines
Recommended:
- Enable if you use noindex directives on any pages
- Works with custom attributes or Magmodules Sitemap and Robots module
Product Attribute
Select the product attribute that contains Meta Robots settings (e.g., NOINDEX,FOLLOW).
For Magmodules Sitemap and Robots module: Use mm_meta_robots
Category Attribute
Select the category attribute that contains Meta Robots settings.
For Magmodules Sitemap and Robots module: Use mm_meta_robots
CMS Page Column
Specify the database column in CMS pages that contains Meta Robots settings.
For Magmodules Sitemap and Robots module: Use mm_meta_robots
Third Party Support
Enable Third Party Support
Enable integrations with third-party modules and sitemap generation.
Third Party Modules
Select which third-party modules to integrate with. Only shows modules that are detected and compatible.
Sitemap Integration
Add hreflang data to your XML sitemap. Requires the Magmodules Sitemap and Robots Module.
What this does: Adds hreflang links to your sitemap.xml:
<url>
<loc>https://example.com/product</loc>
<xhtml:link rel="alternate" hreflang="en-us" href="https://example.com/product"/>
<xhtml:link rel="alternate" hreflang="fr-fr" href="https://example.fr/produit"/>
</url>
Benefits:
- Helps search engines discover hreflang relationships faster
- Consistent data between HTML and sitemap
- Better crawl efficiency for international sites
Products / Categories / CMS Pages / Homepage
Enable hreflang data in the sitemap for each page type.
When to enable:
- Corresponding page type is enabled in Alternate Hreflang Configuration
- You want search engines to discover variations faster
- You're using Magmodules Sitemap module
Debug & Logging
Debug Mode (Logging)
Enable detailed logging to var/log/debug.log for troubleshooting. Logs hreflang generation events, store calculations, and errors.
When to enable:
- Setting up for the first time
- Troubleshooting issues
- Testing configuration changes
When to disable:
- Production (after verification)
- Logs are getting too large
- No issues being investigated
Enable Debug Mode (Frontend)
Allow viewing hreflang tags by adding ?show-alternate=1 to any URL.
How to use:
- Enable this setting
- Visit any page with
?show-alternate=1 - View generated hreflang tags in the output
Example: https://example.com/product?show-alternate=1
Log Viewer
View and download log files directly from the admin panel. Useful for reviewing errors and debug information.
Self-Test
Run diagnostic tests on your configuration. Checks module status, configuration validity, store setup, and URL generation.
Use this to:
- Verify configuration after changes
- Identify potential issues
- Check compatibility
- Validate language codes and store setup
Configuration Tips
Start simple:
- Enable module
- Configure store targeting (one group)
- Enable key page types (homepage, products)
- Test with debug mode
- Expand configuration as needed
For better SEO:
- Always enable canonical integration
- Enable NoIndex handling if using noindex directives
- Use specific language codes (
en-usvsen) - Test configuration before going live
Performance:
- Disable debug logging in production
- Only enable needed page types
- Use sitemap integration for large catalogs (requires Sitemap and Robots Module)
Need More Help?
Documentation:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team