Hreflang tags don’t change after switching language
Learn why hreflang tags may not update immediately on localized pages and how to confirm they’re working correctly.
If your hreflang tags don’t appear to change after switching between localized pages, this is usually expected behavior on Framer sites. In most cases, the tags are working correctly and appear after a full page reload.
Why hreflang tags don’t update immediately
Framer sites use a Single Page Application, or SPA, architecture. In an SPA, navigating between pages does not trigger a full browser refresh. Instead, content updates dynamically in the browser.
Because of this, some source-level HTML changes, including hreflang tags, do not immediately re-render when you switch languages using internal navigation. These tags are included correctly in the page HTML after a full reload.
To learn how to set up hreflang tags correctly, see Setting the language attribute.
How to confirm your hreflang tags are working
If you’re unsure whether your hreflang tags are set up correctly, you can verify them by comparing the page source before and after a full refresh. This helps confirm that the correct tags are applied to each localized page.
Open your published site.
Use the language switcher or internal links to move to another localized page.
Open your browser’s page source or inspect the HTML in the Elements panel.
Check the
hreflangtags and note that they may still reflect the previous page.Perform a full refresh of the page using
⌘Ron Mac orCtrl + Ron Windows.Check the page source again. The
hreflangtags should now match the localized page you’re viewing.
This behavior does not usually indicate a problem with your localization setup. It is a result of how SPAs handle navigation without reloading the full document.
After a full refresh, the correct hreflang tags appear in the HTML source, which confirms that localization is working as expected.
Why don’t the hreflang tags update right away when I switch languages?
Framer uses SPA navigation, so the browser does not reload the full HTML document when you move between localized pages. As a result, some source-level tags only appear updated after a full refresh.
Does this mean my localization is broken?
Usually, no. If the correct
hreflangtags appear after reloading the page, your localization setup is working as expected.Should I check the Elements panel or View Source?
You can use either, but it’s most helpful to check the page again after a full refresh. That gives you the most accurate view of the current page HTML and its
hreflangtags.
Updated