October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Add Open Graph Tags to a Multilingual Website

Use page-specific Open Graph metadata for every locale, and separate reciprocal hreflang links to map localized URLs for Google Search.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Give every localized URL its own Open Graph metadata: set og:locale to that page’s locale, and repeat og:locale:alternate for the other locales available for that page. Use separate, reciprocal hreflang annotations to connect the localized URLs for Google Search; Open Graph locale tags do not do that job.

Add Open Graph metadata to each localized page

Place Open Graph tags in the document’s <head>. The protocol identifies four required properties for each graph object: og:title, og:type, og:image, and og:url. For a localized page, use values that describe and identify that specific version, then set its locale. The Open Graph protocol uses a language and territory separated by an underscore, such as en_GB. Its stated default is en_US; explicitly declaring the page’s actual locale avoids relying on that default. See the Open Graph protocol.

As an Amazon Associate I earn from qualifying purchases.

For example, the English page below is also available in French and Spanish:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<html prefix="og: https://ogp.me/ns#">
<head>
  <title>Example page</title>
  <meta property="og:title" content="Example page" />
  <meta property="og:type" content="website" />
  <meta property="og:url" content="https://example.com/en/page" />
  <meta property="og:image" content="https://example.com/images/page.jpg" />
  <meta property="og:locale" content="en_GB" />
  <meta property="og:locale:alternate" content="fr_FR" />
  <meta property="og:locale:alternate" content="es_ES" />
</head>
</html>

On the French URL, change the title, URL, image and other page-specific metadata to match its content, set og:locale to fr_FR, and list the other available locales as alternates. Do the equivalent for every localized URL. An alternate locale says that the page is available in that locale; it does not provide the URL of that alternate page.

Open Graph array values are expressed as repeated meta elements. If consumers encounter conflicting values, the protocol says the first value is preferred. For an image, it also specifies structured properties such as secure URL, MIME type, width, height and alternative text. When you specify og:image, include og:image:alt to describe the image rather than supply a caption. See the Open Graph structured properties.

Use hreflang separately to connect localized URLs

og:locale and og:locale:alternate label the current page’s locale and other available locales in Open Graph metadata. Google’s hreflang annotations instead associate the actual alternate URLs for Search. Adding Open Graph locales alone does not tell Google which URLs are the language or regional variants.

Google recommends distinct URLs for different language versions. In the HTML head, put a complete set of alternate links on every variant, including a link to itself. Use the same set across variants and make sure the pages link back to one another. For corresponding English and French URLs, with a language-selection fallback:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<link rel="alternate" hreflang="en-GB" href="https://example.com/en/page" />
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/language/page" />

x-default can identify the fallback for users whose language or region is not explicitly covered. Google describes it as particularly suited to a language selector or another default page. Hreflang can also be delivered in a sitemap or HTTP headers; headers can be useful for resources such as PDFs. See Google’s guidance on localized versions of your pages.

Rank #3
Sale
Merriam-Webster’s Everyday Language Reference Set: Includes: The Merriam-Webster Dictionary, The Merriam-Webster Thesaurus, and The Merriam-Webster Vocabulary Builder
  • Provides quick, reliable answers to your questions about words
  • Economically priced to fit your budget
  • Makes a great gift for new high school or college graduates

Keep the two locale formats distinct

Open Graph examples use an underscore between language and territory, such as en_GB. Google’s hreflang syntax uses a hyphen, such as en-GB: an ISO 639-1 language code may be followed by an ISO 3166-1 Alpha 2 region code. A region by itself is not valid. Do not copy one format into the other.

Keep the page language accessible to users and crawlers

Google says it determines page language from visible content, not from the lang attribute or the URL. Make the main content and navigation on each page clearly reflect its primary language. Google also advises against automatically redirecting users between locales based on inferred language: that can make variants inaccessible to users or crawlers. Provide links that let visitors switch languages instead. Read Google’s guidance on managing multi-regional and multilingual sites.

For regional pages written in the same language, canonicalization may matter alongside hreflang. Google describes the canonical URL as a hint, not a binding instruction, and says canonicalization used together with hreflang can help it understand which regional URL to show. See What is URL canonicalization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review the localized metadata before publishing

  • Open each locale URL and confirm it is reachable and its Open Graph title, URL, image and locale describe that version.
  • Check that every listed alternate locale is actually available for that page.
  • Check that hreflang codes use valid language and optional region codes, with hyphens rather than Open Graph’s underscores.
  • Confirm that every variant includes itself in the hreflang set and links back to the other variants.
  • Make sure x-default, if used, points to the intended fallback.
  • Verify that visitors can switch languages without relying on an automatic locale redirect.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need screenshots of localized pages to review their rendered appearance, ScreenshotNeo provides a screenshot API and MCP server. One GET request returns an image or PDF; here is a cURL example for the English page:

Quick Recap

SaleBestseller No. 2
SaleBestseller No. 3
SaleBestseller No. 5
Merriam-Webster’s Spanish-English Visual Dictionary - Features 8,000+ Full-Color Illustrations & 22,500 Terms
Merriam-Webster’s Spanish-English Visual Dictionary - Features 8,000+ Full-Color Illustrations & 22,500 Terms
Designed for student use anywhere; Hands-on learning resource any time you need to reference a word
$18.69
Best Value
Sale
Merriam-Webster’s Spanish-English Visual Dictionary - Features 8,000+ Full-Color Illustrations & 22,500 Terms
  • Designed for student use anywhere
  • Hands-on learning resource any time you need to reference a word
  • Makes a great gift for new high school or college graduates
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/en/page -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners, popups and chat widgets are removed before capture; bot checks, blank pages and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for free.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.