In short
JSON-LD contains many URLs: the address of the page (url), the page the main entity describes (mainEntityOfPage), the breadcrumb steps (item), a product's offer, an author's page. On a translated page, each of them must point to the version in the same language, that is, to the canonical URL of that version. Only a few URLs stay shared: the reference home page of the organization and the website, the logo, the image files. Once this check is done, the JSON-LD of an English page no longer points to French pages.
Why it matters
Google's general guidelines ask you to place structured data on the page it describes, and to make it a true representation of its content. An English page whose markup declares "url": "https://example.com/produits/theiere-fonte/" is in effect saying that it describes the French page: the entity and the page no longer match.
The practical consequences:
- Breadcrumbs: Google may use the
BreadcrumbListmarkup to show the path of a page; steps that point to the default language describe a hierarchy that is not the version's own. - Mixed-up entities: a
Productor anArticlewhoseurland@iddesignate the French page on the English version blurs the distinction between the two versions. See create a distinct @id for each page (opens in a new tab). - Conflicting signal with the page's
canonicaltag andhreflangannotations, which designate the URL of the English version. - Tools and agents that read JSON-LD: they follow the declared URL and land in the wrong language. No generative engine documents this use; it is a reasonable assumption, with no guaranteed effect.
The error almost always comes from the code: a hard-coded base URL, a link built from the ID of the original content, a headless CMS that returns the slug of the default language.
What it improves
- Consistency between JSON-LD,
canonical,hreflangand the visible links of each version. - Breadcrumbs and rich results attached to the right language version.
- Distinction between versions in the data graph of each language.
- Navigation of tools and agents that follow the URLs in the markup. Undocumented effect.
- Rankings No documented direct effect.
How to check
Open a page in a secondary language and paste this code into the browser console. It lists every URL of the site present in the JSON-LD and shows whether it stays in the language of the page:
const lang = document.documentElement.lang.slice(0, 2);
const keys = ['url', 'item', '@id', 'mainEntityOfPage', 'target'];
const rows = [];
const walk = (node, type) => {
if (Array.isArray(node)) {
node.forEach((child) => walk(child, type));
return;
}
if (!node || typeof node !== 'object') {
return;
}
const current = node['@type'] ? [].concat(node['@type']).join(', ') : type;
for (const [key, value] of Object.entries(node)) {
if (keys.includes(key) && typeof value === 'string' && value.startsWith(location.origin)) {
rows.push({ type: current, key, value, sameLanguage: new URL(value).pathname.startsWith(`/${lang}/`) });
}
walk(value, current);
}
};
document.querySelectorAll('script[type="application/ld+json"]').forEach((script) => walk(JSON.parse(script.textContent), ''));
console.table(rows);
Expected result: sameLanguage is true everywhere, except for the @id and url of the organization and the website, which deliberately point to the reference home page. On the default language served without a prefix, check the opposite: no URL should start with /en/ or /de/.
Across the whole site, Screaming Frog extracts structured data (Configuration > Spider > Extraction, JSON-LD checkboxes); a custom extraction on the "url" values then lets you filter by language segment.
How to implement
Before you start
Expected values on the English page of a product:
| Property | Value on /en/products/cast-iron-teapot/ |
|---|---|
url and base of the @id of the WebPage |
https://example.com/en/products/cast-iron-teapot/ |
url, mainEntityOfPage of the Product or Article |
The same URL |
offers.url |
The same URL |
item of the breadcrumb |
https://example.com/en/, https://example.com/en/teapots/ |
author.url |
English author page if it exists, otherwise the default author page |
potentialAction.target of a SearchAction |
https://example.com/en/search?q={search_term_string} |
url and @id of Organization and WebSite |
Reference home page, identical everywhere |
image, logo |
File shared by all languages, acceptable |
Rules:
- Canonical URL of the version: the same value, character for character, as the page's
canonicaltag (protocol, host, trailing slash). See use a self-referencing canonical for each actual translation (opens in a new tab). - Absolute URLs, never relative ones.
- Generated by the language functions of the CMS or framework, like the visible links, never by concatenating a hard-coded domain and a slug.
- Missing translation: if a linked page does not exist in the language, point to the fallback version set by your rule for missing translations (opens in a new tab), knowing that the URL will switch language.
Breadcrumb of the English version:
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"@id": "https://example.com/en/products/cast-iron-teapot/#breadcrumb",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "https://example.com/en/" },
{ "@type": "ListItem", "position": 2, "name": "Teapots", "item": "https://example.com/en/teapots/" },
{ "@type": "ListItem", "position": 3, "name": "Cast iron teapot, 1.2 L" }
]
}
WordPress
Versions WordPress 6.5 and later, Yoast SEO, Rank Math, WPML and Polylang, November 2026.
Yoast SEO and Rank Math build their URLs from the canonical of each translation: the result is generally correct, but check the breadcrumb and the home page, which have been the subject of issues reported after a change of the language URL format in WPML.
In custom markup, always get the URL of the current translation of a linked piece of content, not that of the original:
function translatedPermalink(int $postId): string
{
if (function_exists('pll_get_post')) {
$translatedId = pll_get_post($postId);
return get_permalink($translatedId ?: $postId);
}
$translatedId = apply_filters('wpml_object_id', $postId, get_post_type($postId), true);
return get_permalink($translatedId);
}
pll_get_post() (Polylang) and the wpml_object_id filter (WPML) return the ID of the translation in the current language; WPML's last argument, true, falls back to the original if the translation is missing. For the home page of the language, use pll_home_url() with Polylang, or apply_filters('wpml_home_url', home_url('/')) with WPML. Clear the page cache after making changes.
Shopify
Versions Online Store 2.0 themes, Liquid, November 2026.
The URLs produced by Liquid take the language into account: product.url returns /products/theiere-fonte on the primary language and /en/products/... on the English version, and the same goes for collection.url and the routes object. Make them absolute with request.origin, and never write a hard-coded path:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": {{ 'general.breadcrumbs.home' | t | json }}, "item": {{ request.origin | append: routes.root_url | json }} }
{%- if collection -%},
{ "@type": "ListItem", "position": 2, "name": {{ collection.title | json }}, "item": {{ request.origin | append: collection.url | json }} }
{%- endif -%},
{ "@type": "ListItem", "position": {% if collection %}3{% else %}2{% endif %}, "name": {{ product.title | json }}, "item": {{ canonical_url | json }} }
]
}
</script>
Adapt the translation key general.breadcrumbs.home to those of your theme. Merchants have reported unexpected values of routes.root_url depending on how markets are configured: check the output on each language and each domain.
Drupal
Versions Drupal 10 and 11, Content Translation and Schema.org Metatag modules.
The [node:url] and [current-page:url] tokens are resolved in the language of the translation being displayed. Use them for url and mainEntityOfPage in the Metatag configuration, and the Easy Breadcrumb module or the theme's breadcrumb for the steps, which follow the current language.
Laravel
Versions Laravel 11 to 13.
If the language is a route parameter (/{locale}/products/{product}), declare it once per request in a middleware with URL::defaults(), as the Laravel documentation recommends:
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\URL;
use Symfony\Component\HttpFoundation\Response;
class SetLocaleFromRoute
{
public function handle(Request $request, Closure $next): Response
{
$locale = $request->route('locale');
app()->setLocale($locale);
URL::defaults(['locale' => $locale]);
return $next($request);
}
}
route('products.show', $product) then produces the URL of the current language, in visible links as well as in the JSON-LD. With the Laravel Localization package, use LaravelLocalization::getLocalizedURL() for the same reason. Check that APP_URL contains the production domain.
Next.js
Versions Next.js 15 and 16 (App Router), next-intl.
Centralize URL building in a shared module that takes the language as a parameter:
// lib/urls.ts
const SITE_URL = (process.env.NEXT_PUBLIC_SITE_URL ?? 'https://example.com').replace(/\/$/, '');
const DEFAULT_LOCALE = 'fr';
export function absoluteUrl(locale: string, path: string): string {
const prefix = locale === DEFAULT_LOCALE ? '' : `/${locale}`;
return `${SITE_URL}${prefix}${path}`;
}
In a page: url: absoluteUrl(locale, '/products/cast-iron-teapot/'). If paths are translated (/de/produkte/...), use next-intl's getPathname function, fed by the same path configuration as the visible links. With a headless CMS, request the slug for the route's language, never the one for the default language.
Nuxt
Versions Nuxt 3 and 4, @nuxtjs/i18n and Nuxt Schema.org modules.
Build URLs with useLocalePath() (or useLocaleRoute()) from @nuxtjs/i18n, then make them absolute with the site URL declared in the configuration. Nuxt Schema.org automatically resolves the relative URLs of the entities it generates against this site URL.
Common mistakes
- Hard-coded base URL in a template (
https://example.com/produits/): every language points to French. - Permalink of the original instead of that of the translation in custom markup.
- Breadcrumb whose first step leads to the home page of the default language.
- URL different from the canonical: an extra trailing slash,
wwwor tracking parameter. - Organization and website whose
urlchanges from one language to another while their@idis shared: choose one value and keep it. See keep a stable organization @id (opens in a new tab). - Images duplicated per language for no reason: the same file can serve every version, unless it contains text that needs translating.
Frequently asked questions
Should the organization's URL change with the language?
No, this is the exception. The organization is the same entity in every language: its @id stays identical everywhere, and its url generally points to the site's reference home page. Only the entities specific to a page, such as the page itself, the article, the product, the offer or the breadcrumb, take the URL of the language version displayed. Keep the same organization url value on every version.
Should images have a different URL for each language?
Not necessarily. A product photo without text can keep the same file URL in every language version, in the JSON-LD as well as on the page. Plan one image per language only when it contains text, an advertising visual or an infographic for example. The alternative text and the caption, however, must be translated in each version.
What should url contain when the linked page is not translated?
Point to the fallback page set by your rule for missing translations, usually the version in the default language, and accept this change of language. Do not invent a translated URL that would return a 404 error or a redirect. The best approach is still to mark up only links to existing pages, and to complete the translation of the pages you reference often.
Resources
- Google Search Central: General structured data guidelinesdevelopers.google.com
- Google Search Central: Breadcrumb (BreadcrumbList)developers.google.com
- schema.org: url and mainEntityOfPageschema.org
- Shopify: Support multiple currencies and languages in a themeshopify.dev
- Laravel: Default values for URLslaravel.com
- Polylang: Functions for developerspolylang.pro
- WPML: Hooks for developerswpml.org
Updated on
Topic checklist (PDF)