Understand canonical URLs

The canonical URL should describe the current object in the current locale using its preferred prefix, route bases, hierarchy, slugs, pagination, and trailing-slash form.

POM Translate first determines the equivalent base-language context, then localizes that address for the active locale. This prevents a translated page from declaring the base-language URL as its canonical destination.

Supported contexts

Canonical context is derived for:

  • the front page and posts page;
  • singular posts, pages, and public custom post types;
  • category, tag, and custom taxonomy archives;
  • post-type archives;
  • author archives;
  • search results;
  • paginated views.

If a normal WordPress context helper cannot determine the URL, POM Translate reconstructs a base address from the current request before localizing it.

Feed URLs

Native site and comment feeds also work under an enabled language prefix, for example /es/feed/, /es/feed/atom/, and /es/comments/feed/. WordPress retains the selected feed format and comment scope. A language-prefixed ?feed=rss2 request reads the posts feed even when the site uses a static front page. Feed availability still follows WordPress and any feed or comment restrictions configured on the site.

Canonical redirects add the language prefix once. Relative feed and pagination suffixes remain relative when WordPress appends them to an existing address. Check the final feed response with a feed reader: it should be XML, without repeated language segments or a page-not-found response.

SEO plugin integration

POM Translate filters canonical output from:

  • Rank Math;
  • Yoast SEO.

It uses the same route localization rules used by public links and language alternates. Query strings and fragments are retained when they belong to the base URL being localized.

Verify the canonical

  1. Open the final public URL in a private window.
  2. Confirm the response does not redirect again.
  3. Inspect the document <head>.
  4. Find the canonical link emitted by the active SEO system.
  5. Compare its scheme, host, site subdirectory, language prefix, full path, pagination, and trailing slash with the browser URL.
  6. Repeat in the base locale and one additional locale.

A source-language slug can legitimately appear in the canonical when no translated slug exists. The problem is inconsistency, not merely the presence of source wording.

Do not create multiple canonical tags in the theme to compensate for an integration issue. Determine which component emits the current canonical and verify that POM Translate's supported filter is running.

Alternate-language discovery is covered separately in Understand alternate-language links.