{
  "id": 3447036,
  "title": "I built a zero-dependency CLI to audit hreflang (international SEO)",
  "url": "https://urgent.news/2026/08/26/i-built-a-zero-dependency-cli-to-audit-hreflang-international-seo",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-26T06:19:32.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/madahzadeh/i-built-a-zero-dependency-cli-to-audit-hreflang-international-seo-47bm"
  },
  "original_language": "en",
  "account": "hreflang-audit is a single-file Node.js 20+ command-line interface (CLI) designed to audit hreflang markup for international SEO. It tackles common mistakes such as invalid ISO language/script/region codes, underscore locales, relative URLs, missing return links, conflicting entries, and broken target URLs. The tool crawls websites or parses XML sitemaps and sitemap indices, examining link rel= alternate hreflang elements, HTTP Link: headers, and xhtml:link sitemap entries. It offers 11 checks to detect issues, providing both human-readable reports and machine-readable output with exit codes for continuous integration (CI) systems. In addition to a standard CLI, hreflang-audit includes a GitHub Action for automated weekly audits, failing builds when hreflang issues arise. Users can quickly test the tool offline with a demo using the command line: git clone https://github.com/madahzadeh/hreflang-audit.git cd hreflang-audit npm run demo. The project is open-source under the MIT license. While hreflang-audit provides comprehensive checks, it's important to note that it relies on tolerant regexes for HTML parsing, does not execute JavaScript-rendered pages, and serves as a complementary tool rather than a replacement for Google Search Console's reports. The repository is available at github.com/madahzadeh/hreflang-audit, and the creators welcome feedback and issue reports. Currently, sitemap/HTML mismatch detection is planned for future enhancements.",
  "summary": "If your site serves multiple languages, hreflang is where SEO quietly breaks: page A links B, B never links back; someone writes en_US instead of en-US ; an alternate points at a redirect; the target canonicalizes somewhere else. None of it is visible in the browser — all of it costs you in the SERPs. hreflang-audit is a single-file Node.js 20+ CLI with zero npm dependencies. It crawls your site…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}