Issue
-
The Liferay server outputs all Liferay instance locales as Open Graph locale alternate meta tags. Is this expected? Should Liferay output Open Graph locale alternate meta tags, when page content only uses the default locale (e.g. "en_US")?
<meta property="og:locale" content="en_US"> <meta property="og:locale:alternate" content="en_US"> <meta property="og:locale:alternate" content="ar_SA"> <meta property="og:locale:alternate" content="ca_ES"> <meta property="og:locale:alternate" content="zh_CN"> <meta property="og:locale:alternate" content="nl_NL"> <meta property="og:locale:alternate" content="fi_FI"> <meta property="og:locale:alternate" content="fr_FR"> <meta property="og:locale:alternate" content="de_DE"> <meta property="og:locale:alternate" content="hu_HU"> <meta property="og:locale:alternate" content="ja_JP"> <meta property="og:locale:alternate" content="pt_BR"> <meta property="og:locale:alternate" content="es_ES"> <meta property="og:locale:alternate" content="sv_SE">
Environment
- DXP 7.3
Resolution
- Yes, the behaviour is expected even when the page content only uses the default locale (such as en_US). A given page is reachable via all of its site's current locales. So, regardless if the page's content is reachable to all available languages or not, Open Graph meta tags by default follow this behaviour.
Additional Information
- Liferay DXP 7.4 has seen the inclusion of this feature request, designed to give further control over SEO. This new functionality can be found under: Control Panel > System Settings > Pages > SEO: Enable Only Translated Hreflangs