SEO

PerfLocale ships a full modern-SEO stack designed specifically for multilingual sites. Hreflang and sitemaps are on by default; the other features are opt-in and disabled out of the box to keep the plugin lightweight. Configure all of it at Settings → SEO.

Hreflang alternates

Every frontend page automatically emits <link rel="alternate" hreflang="..."> tags for every translation that exists, plus hreflang="x-default" pointing at the default-language version. Generated from the translation group, cached per-request, and deduplicated when an SEO plugin (Yoast, Rank Math, AIOSEO, SEOPress, Slim SEO, The SEO Framework) is active so there are never two sets of hreflang tags fighting. Nothing to configure.

Sitemap alternates

PerfLocale hooks into WordPress core’s XML sitemap and attaches <xhtml:link rel="alternate"> entries for translations of every listed URL. If your SEO plugin supplies the sitemap instead, PerfLocale detects that and integrates via its extension point rather than emitting a competing sitemap. No setup needed.

JSON-LD Schema Enrichment

Adds two small pieces of structured data to whatever JSON-LD your SEO plugin is already emitting: inLanguage (the current page’s language, BCP-47 normalised) and workTranslation (array of URLs pointing at sibling translations). Helps Google surface the right language in search results and lets AI crawlers understand your site’s structure. On by default. See SEO Schema Enrichment for the deep-dive.

Content-Language header

Emits the W3C-standard Content-Language HTTP response header on every frontend request, BCP-47 normalised (de_DEde-DE). Honoured by Google, Yandex, CDN layers, and some assistive tech in addition to the <html lang> attribute. On by default; filter perflocale/content_language/value customises the value.

data-nosnippet fallback guard

When the Missing Translation Action is set to Show default language, a visitor to /de/mypost/ might see the English content. Without protection, Google indexes that English text under the /de/ URL and shows English snippets in German SERPs. PerfLocale wraps the fallback content with <div data-nosnippet> so Google keeps the URL indexed but omits the mismatched snippet. Only activates when fallback is actually happening. On by default.

IndexNow push-indexing

Tells Bing and Yandex (plus Google via the Cloudflare relay) the moment a translation changes, so indexing happens in hours instead of days. The unique value PerfLocale adds over generic SEO-plugin IndexNow integrations (Rank Math, Yoast) is sibling push: when you edit the English post, PerfLocale also notifies about the German + French siblings whose hreflang alternates just changed - something a generic SEO plugin can’t do because it doesn’t know the translation graph. Disabled by default; enable + auto-generate a 32-char hex key at Settings.

Speculation Rules prerender

When a visitor hovers a language-switcher link, Chromium prerenders the target translation in the background so clicking it feels instant. On WP 6.8+, integrates with Core’s native Speculation Rules API (our rule lands inside Core’s single output script); on older WP, emits a standalone script. Moderate eagerness - prerenders fire only on hover/focus, so visitors who never interact with the switcher never trigger a fetch. Disabled by default.

View Transitions

Smooth 240 ms crossfade between languages using the cross-document View Transitions API (Chrome 126+, Safari 18.2+). Progressive enhancement - unsupported browsers navigate normally. The emitted CSS respects prefers-reduced-motion, zeroing the animation for users with that OS preference (WCAG 2.1 SC 2.3.3). Disabled by default; enable when your theme doesn’t run its own on-navigation animations.

← Back to Docs