WP Manifestindependent plugin directory
manifest / seo / hreflang-sync-by-sitemaps

Hreflang Sync by Sitemaps

A WordPress plugin that generates and syncs hreflang tags from XML sitemaps for multilingual sites.

★ 0stars
2release downloads
v1.0.5latest · 7mo ago

Install

Download hreflang-sync-by-sitemaps.zip From the v1.0.5 release on GitHub, Mar 16, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/wowanium/hreflang-sync-by-sitemaps/releases/download/v1.0.5/hreflang-sync-by-sitemaps.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WordPress plugin that generates hreflang tags for multi-domain website clusters by syncing URL slugs from XML sitemaps.

What it does

If you manage several country domains or regional sites with the same URL structure, manual hreflang mapping becomes slow and error-prone. This plugin is built for a more practical setup:

  • each site uses the same page pattern, such as /store/{slug}/
  • the same slug exists across multiple domains
  • hreflang tags should only be output when the matching page actually exists on the target domain

The plugin fetches sitemap data, extracts slugs by prefix, stores a cache per domain, and prints valid alternate tags in the page <head>.

Main features

  • supports multi-domain hreflang setups
  • parses both urlset and sitemapindex XML sitemaps
  • syncs slugs from each configured domain
  • outputs rel="alternate" hreflang="..." tags only for real matches
  • supports a custom path prefix such as /store/, /casino/, or /bookmakers/
  • optional x-default output
  • scheduled daily sync via WordPress cron
  • manual sync option from the WordPress admin panel

Requirements

  • WordPress 5.8 or higher
  • PHP 7.4 or higher

Installation

  1. Download or clone this repository.
  2. Upload the plugin folder to /wp-content/plugins/.
  3. Activate Hreflang Sync by Sitemaps in WordPress.
  4. Open Tools → Hreflang Sync.
  5. Add your domains, hreflang codes, and sitemap URLs.
  6. Run the first sync manually.
  7. Check page source on a matching page and verify the generated hreflang tags.

Typical use case

Example cluster:

  • example.de/store/amazon/
  • example.fr/store/amazon/
  • example.co.uk/store/amazon/

If the slug amazon exists on all configured domains, the plugin can output alternate links between them. If one domain does not have that slug, it is skipped.

Important notes

  • Use this plugin only when your sites follow a predictable shared URL pattern.
  • Do not run another plugin that also outputs hreflang tags, or you may create duplicates.
  • This plugin does not create pages. It only maps and outputs alternate URLs for pages that already exist.
  • It is designed mainly for multi-domain clusters, not for full single-domain multilingual frameworks.

Admin workflow

After activation:

  1. go to Tools → Hreflang Sync
  2. configure the domain list
  3. set each domain's hreflang code
  4. provide the sitemap URL for each site
  5. define the path prefix used to extract slugs
  6. run sync and verify the cache

Example scenarios

This plugin is useful for:

  • international store directories
  • affiliate sites split by country domain
  • SEO landing page clusters with the same slug logic
  • large site networks where manual reciprocal hreflang maintenance is not realistic

Plugin data flow

  1. Fetch XML sitemap from each configured site.
  2. Parse nested sitemaps when needed.
  3. Extract URLs matching the configured path prefix.
  4. Convert matching URLs into slugs.
  5. Store the slug map in WordPress options.
  6. On page load, match the current slug against the cache.
  7. Output only the valid hreflang links.

Development notes

Current plugin header values:

  • Plugin Name: Hreflang Sync by Sitemaps
  • Text Domain: hreflang-sync-by-sitemaps
  • Requires at least: 5.8
  • Requires PHP: 7.4
  • License: GPLv2 or later

License

This project is licensed under the GNU General Public License v2.0 or later. See the LICENSE file for details.

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.0.5 latest
Mar 16, 2026 7mo ago
hreflang-sync-by-sitemaps.zip
2