seo-hreflang

Validate multilingual hreflang tags and generate corrected HTML, header, or XML outputs.

6|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/BestLemoon/codex-seo --skill seo-hreflang-bestlemoon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: seo-hreflang
Source: https://github.com/BestLemoon/codex-seo/tree/main/skills/seo-hreflang
Command: npx skills add https://github.com/BestLemoon/codex-seo --skill seo-hreflang-bestlemoon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Multilingual and multiregional websites often have inconsistent or invalid hreflang implementations that cause search engines to ignore language alternates, serve the wrong regional content, or lose international indexing. This Skill identifies those issues, enforces canonical and protocol consistency, validates language and region codes, and produces corrected hreflang outputs ready for deployment.

Core Features & Use Cases

  • Comprehensive Validation: Checks self-referencing tags, bidirectional return tags, x-default presence, canonical alignment, protocol consistency, and correct ISO 639-1 / ISO 3166-1 usage.
  • Generation & Output: Produces ready-to-implement HTML link tags, HTTP header values, or hreflang sitemap XML for large and cross-domain sites.
  • Use Case: Audit a site after an HTTPS migration or during a multilingual rollout to detect broken hreflang sets, fix invalid codes like "eng" or "en-uk", and generate a validated hreflang sitemap for submission to search engines.

Quick Start

Run a full hreflang audit for https://example.com and generate corrected hreflang tags plus a sitemap-ready XML file.

Frequently Asked Questions about seo-hreflang

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate hreflang tags for a multilingual website?

Hreflang validation checks self-referencing tags, bidirectional return tags, canonical alignment, and ISO 639-1/ISO 3166-1 codes to ensure search engines correctly serve multilingual content. It detects invalid language-region codes and enforces protocol consistency across HTML, HTTP headers, or XML sitemaps.

How do I generate hreflang sitemap XML for cross-domain sites?

Generate hreflang sitemap XML by validating ISO 639-1/3166-1 language and region codes and outputting ready-to-implement XML entries for cross-domain setups. This produces a sitemap-ready file containing correct hreflang tags for search engine submission.

Why are my hreflang tags being ignored by search engines?

Search engines ignore hreflang tags when implementations contain invalid language codes like "eng" or "en-uk", missing bidirectional return tags, or canonical misalignment. Validating hreflang sets against ISO standards and enforcing x-default presence resolves these international indexing issues.

Does hreflang validation work for HTTP header implementations?

Hreflang validation applies to HTTP header implementations, HTML link tags, and XML sitemaps. It performs protocol consistency checks and validates ISO 639-1/3166-1 codes across country-specific TLDs, subdirectories, and subdomains to ensure correct regional content serving.

What is the best way to fix invalid hreflang codes after an HTTPS migration?

The best way to fix invalid hreflang codes after an HTTPS migration is to audit the site to detect broken hreflang sets, validate language and region codes against ISO 639-1/3166-1, and generate corrected HTML link tags or HTTP header values ready for deployment.