Configure CMS pages with the Href-Lang
This guide explains how to configure hreflang for CMS pages and the homepage using the Alternate Hreflang Extension. Unlike products and categories, CMS pages don't have automatic language relationships in Magento, so the module provides a grouping system to connect translations. Learn how to use the "Alternate Language Category" field to link your multilingual content pages correctly.
Why CMS Pages Are Different
Products and Categories
Products and categories have built-in parent-child relationships across store views:
- Same product ID in multiple stores = automatic connection
- Product in EN store and FR store with same ID = translations
- Module automatically generates hreflang tags
CMS Pages and Homepage
CMS pages are independent per store view:
- No automatic relationship between pages
- Homepage in EN store ≠ homepage in FR store (from Magento's perspective)
- "About Us" page has no link to French "À Propos" page
- You must manually group them
The Alternate Language Category Field
When editing a CMS page, you'll see a new section: Alternate Language Settings
This contains:
- Alternate Language Category - Select existing category or create new one
- New Category - Enter name for a new grouping
How It Works
- All pages in the same category link to each other with hreflang tags
- Pages in different categories don't link to each other
- Ungrouped pages (no category) have no hreflang tags
Think of it like: "These pages are the same content, just in different languages"
Step-by-Step Setup
Example: About Us Page
You have these CMS pages:
about-us(English store)a-propos(French store)uber-uns(German store)
Step 1: Edit English Page
Navigate to: Content → Pages → About Us
- Scroll to Alternate Language Settings
- Click New Category field
- Enter:
about-page - Save page
Step 2: Edit French Page
Navigate to: Content → Pages → À Propos
- Scroll to Alternate Language Settings
- Select dropdown:
about-page(now available) - Save page
Step 3: Edit German Page
Navigate to: Content → Pages → Über Uns
- Scroll to Alternate Language Settings
- Select dropdown:
about-page - Save page
Result:
All three pages now have hreflang tags:
<!-- On English page -→
<link rel="alternate" hreflang="en-us" href="https://example.com/about-us" />
<link rel="alternate" hreflang="fr-fr" href="https://example.fr/a-propos" />
<link rel="alternate" hreflang="de-de" href="https://example.de/uber-uns" />
Homepage Setup
The homepage works exactly the same way.
Example: Multilingual Homepage
Step 1: Edit Homepage (English store)
Navigate to: Content → Pages → Home Page (in English store view)
- Scroll to Alternate Language Settings
- New Category:
homepage - Save
Step 2: Edit Homepage (French store)
Switch to French store view, then:
Navigate to: Content → Pages → Page d'accueil (in French store view)
- Scroll to Alternate Language Settings
- Select:
homepage - Save
Step 3: Repeat for other stores
Each store's homepage → select homepage category
Result:
<link rel="alternate" hreflang="en-us" href="https://example.com/" />
<link rel="alternate" hreflang="fr-fr" href="https://example.fr/" />
<link rel="alternate" hreflang="de-de" href="https://example.de/" />
Common CMS Page Scenarios
Scenario 1: Simple Multi-Language Site
Pages to group:
- Homepage in all languages → category:
homepage - About page in all languages → category:
about-page - Contact page in all languages → category:
contact-page - Privacy policy in all languages → category:
privacy-page
Setup:
Category: homepage
├── Home (EN) - example.com/
├── Accueil (FR) - example.fr/
└── Startseite (DE) - example.de/
Category: about-page
├── About Us (EN) - example.com/about-us
├── À Propos (FR) - example.fr/a-propos
└── Über Uns (DE) - example.de/uber-uns
Category: contact-page
├── Contact (EN) - example.com/contact
├── Contact (FR) - example.fr/contact
└── Kontakt (DE) - example.de/kontakt
Scenario 2: Different Content Per Region
Some pages only exist in certain languages.
Example: Legal pages that differ by country
Category: privacy-eu
├── Privacy Policy (EN-GB) - example.co.uk/privacy
├── Politique de confidentialité (FR) - example.fr/confidentialite
└── Datenschutz (DE) - example.de/datenschutz
Category: privacy-us
└── Privacy Policy (EN-US) - example.com/privacy
(No other languages - US-specific content)
Category: terms-eu
├── Terms & Conditions (EN-GB) - example.co.uk/terms
├── Conditions Générales (FR) - example.fr/conditions
└── AGB (DE) - example.de/agb
Important: Don't link EU privacy pages to US privacy pages if the content differs significantly.
Scenario 3: Promotional Landing Pages
Campaign in multiple markets:
Category: summer-sale-2024
├── Summer Sale (EN-US) - example.com/summer-sale
├── Soldes d'été (FR-FR) - example.fr/soldes-ete
├── Sommerschlussverkauf (DE-DE) - example.de/sommer-sale
└── Summer Sale (EN-GB) - example.co.uk/summer-sale
All pages promote same sale, different languages → group together.
Category Naming Best Practices
Good Category Names
✅ Descriptive and unique:
homepageabout-pageshipping-inforeturn-policyfaq-general
✅ Include campaign/year if temporary:
black-friday-2024spring-sale-2024
✅ Use store/region if content differs:
privacy-euprivacy-usterms-b2bterms-b2c
Bad Category Names
❌ Too generic:
page1cmsgroup-a
❌ Language-specific:
about-us-english(category is for ALL languages)french-pages
Why: Category name is internal only. Use it to identify which pages belong together, not which language they are.
Verifying Your Setup
Test Individual Pages
- Enable debug mode in module configuration
- Visit CMS page with
?show-alternate=1https://example.com/about-us?show-alternate=1 - Verify hreflang tags appear
- Check all grouped pages are listed
Test Homepage
Visit homepage with debug parameter:
https://example.com/?show-alternate=1
Check output shows all store homepages.
Common Issues
Problem: Tags not appearing
Check:
- CMS Pages enabled in module configuration
- All pages in group have same category name
- Pages assigned to correct store views
- Cache cleared after changes
Problem: Wrong pages grouped together
Check:
- Category spelling is exactly the same
- Not confusing similar page types (e.g., "Terms B2B" vs "Terms B2C")
Working with Multiple Store Groups
If you have separate product lines:
Group 1: Fashion Stores
└── Category: homepage-fashion
├── Fashion Home (EN) - fashion.com/
├── Mode (FR) - mode.fr/
└── Mode (DE) - mode.de/
Group 2: Electronics Stores
└── Category: homepage-electronics
├── Electronics Home (EN) - electronics.com/
├── Électronique (FR) - electronique.fr/
└── Elektronik (DE) - elektronik.de/
Don't cross-link: Fashion homepage should not link to Electronics homepage, even in same language.
Bulk Setup Tips
For Many CMS Pages
-
Create category naming scheme first:
- List all CMS page types
- Define category name for each type
- Document in spreadsheet
-
Update in batches:
- Group by page type (all "About" pages first)
- Create category on first page
- Apply same category to translations
-
Use consistent naming:
homepagenothome-pageorhome_page- Stick to one format project-wide
Recommended Categories for Standard Pages
Common pages on most sites:
homepage → All homepage variations
about-page → About Us pages
contact-page → Contact pages
shipping-info → Shipping information
return-policy → Return/refund policies
privacy-page → Privacy policies
terms-page → Terms & conditions
faq-general → General FAQ pages
Important Notes
Store View Assignment
CMS pages must be assigned to correct store views:
- English "About Us" → assigned to English store
- French "À Propos" → assigned to French store
- Don't assign same page to multiple stores (defeats the purpose)
URL Keys
Each page should have appropriate URL for its language:
- ✅
about-us(English) - ✅
a-propos(French) - ❌
about-us(used in all stores)
Category Field Is Optional
Pages without a category simply won't have hreflang tags:
- Single-store sites don't need it
- Store-specific pages (no translations) don't need it
- Only group pages that are true translations
Debugging
Self-Test
Run module self-test:
- Admin → Magmodules → Alternate Hreflang → Developer → Self-Test
- Check CMS Pages section
- Verify grouped pages detected
Check Categories
No admin overview of categories exists. To audit:
- Export CMS pages with categories (custom SQL or export)
- Review which pages share categories
- Verify groupings are correct
SQL to list categories:
SELECT
cms_page.title,
cms_page.identifier,
cms_page.alternate_category
FROM cms_page
WHERE cms_page.alternate_category IS NOT NULL
ORDER BY cms_page.alternate_category, cms_page.title;
Key Takeaways
- CMS pages don't auto-link - you must group them manually
- Use "Alternate Language Category" field in CMS page edit form
- Same category = pages link with hreflang tags
- Category names are internal - use descriptive names
- Homepage is just another CMS page - group it the same way
- Don't group unrelated pages - only true translations
- Test with
?show-alternate=1to verify setup - Clear cache after changes to see results
Need More Help?
Documentation:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team