Skip to content
Browse all guides

Issue #120 · important

Issue 120

What is this issue?

The og:locale meta tag specifies the locale (language and region) of your web page content. This helps social platforms display your content correctly to users in different regions and languages.

This issue checks whether your page has the og:locale tag implemented. A passing implementation must include:

  • og:locale - The locale in the format language_TERRITORY (e.g., en_US, fr_FR, de_DE)

Example of passing implementation:

<meta property="og:locale" content="en_US" />

Why does it matter?

The og:locale tag is important for international audiences and social media sharing:

  • Correct regional formatting: Ensures dates, numbers, and currencies display correctly
  • Language targeting: Helps social platforms show content to users in the correct language
  • Regional sharing: Content shared in different regions will display with appropriate localization
  • AI Search / AEO: AI systems use locale information to understand content targeting
  • User experience: Users see content formatted according to their regional expectations

Without the og:locale tag, social platforms may:

  • Display content with incorrect regional formatting
  • Misinterpret the language or region of your content
  • Show content to inappropriate audiences

Resolving this issue improves international social media sharing and contributes to a higher overall SEO health score by ensuring proper content localization.

How to fix it

  1. Add the og:locale tag to your HTML <head> section:

    • Use the format language_TERRITORY (lowercase language code, underscore, uppercase territory code)
    • Common examples: en_US, en_GB, fr_FR, de_DE, es_ES, ja_JP
  2. Choose the correct locale:

    • Match the primary language and region of your page content
    • Use ISO 639-1 language codes and ISO 3166-1 alpha-2 country codes
  3. For multi-language sites:

    • Set og:locale to the primary language/region of each specific page
    • Consider using og:locale:alternate for additional language versions
  4. Test your implementation:

    • Use Facebook Sharing Debugger to verify locale is detected
    • Check that content displays correctly when shared in different regions

Examples

Example 1: Missing OG Locale

Problematic state (what fails):

<meta property="og:title" content="My Page" />
<!-- Missing og:locale tag -->

Corrected state (what passes):

<meta property="og:title" content="My Page" />
<meta property="og:locale" content="en_US" />

Example 2: Incorrect Locale Format

Problematic state (what fails):

<meta property="og:locale" content="english-United States" />
<!-- Incorrect format -->

Corrected state (what passes):

<meta property="og:locale" content="en_US" />
<!-- Correct ISO format -->

Example 3: Multi-language Site

Corrected state (what passes):

<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="fr_FR" />
<meta property="og:locale:alternate" content="es_ES" />
<!-- Primary locale with alternatives -->

How PixyScan detects this

PixyScan checks for the og:locale tag by:

  1. Fetching the page HTML after following all redirects
  2. Parsing the <head> section to extract the meta tag with property="og:locale"
  3. Validating presence: Checks that the og:locale tag exists
  4. Validating format: Ensures the value matches the expected language_TERRITORY format
  5. Flagging the issue if the tag is missing or contains an invalid format

The detection is performed on the raw HTML response without JavaScript execution, matching how social media crawlers see your pages.

References