This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Hreflang Checker

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Hreflang Checker scans the current page for rel="alternate" hreflang tags and provides a comprehensive analysis of your international language annotations. It displays every hreflang tag with its language code and corresponding URL, then checks for common issues: duplicate language codes (multiple entries for the same language), invalid language codes (not following IETF BCP 47 format), missing x-default tags, self-referencing URLs, and potential missing return links. Each issue comes with a severity level (error, warning, or info) and clear recommendations for fixing it. Perfect for SEO audits of multilingual sites, content localization validation, and ensuring proper language targeting for search engines.

WHERE IT RUNS

Any webpage—the script scans the page's head for hreflang link tags. No server-side calls, no external dependencies, no site-specific configuration. Works on local files, development environments, production sites, and pages behind authentication. The analysis is entirely client-side using standard DOM APIs.

HOW TO USE

Install the script and open any page. The panel automatically checks for hreflang tags and displays the results. The summary shows the status (Valid, Warnings, or Issues), the number of hreflang tags found, and the total issues detected. Each hreflang tag is listed with its language code and URL. Toggle "Show warnings" to include or exclude warning-level issues from the report. Click "Check Now" to re-scan—useful for pages where hreflang tags are added dynamically. Click "Copy Report" to copy the full hreflang report to your clipboard. Keyboard shortcut: Ctrl+Shift+H to re-scan without opening the panel.

TECHNICAL MECHANISM

The script scans the page using document.querySelectorAll('link[rel="alternate"][hreflang]') to find all hreflang tags. For each tag, it reads the hreflang attribute and the href attribute, resolving relative URLs using new URL(href, window.location.origin). It then performs a series of checks: validates language codes against a basic IETF BCP 47 pattern (/^[a-z]{2,3}(-[a-zA-Z]{2,4})?$/), detects duplicates by grouping tags by hreflang value, checks for the presence of an x-default tag, identifies self-referencing URLs by comparing the current page's path with each hreflang URL's path, and flags potential missing return links by noting each external URL that should have a reciprocal tag. Results are categorized by severity and rendered with color-coded indicators (red for errors, amber for warnings, blue for info). The report includes the current page URL, all discovered hreflang tags (with x-default highlighted), and a filtered list of actionable issues.

THE PANEL

The tool runs inside BGPanel, a lightweight UI system built into the BotGentz extension. Drag the panel by its header to reposition it anywhere on screen—it snaps to edges and remembers its position per site. Click the header to collapse the panel into a small bubble; click again to expand. Resize the panel by dragging its bottom-right corner. Press Escape at any time to close the panel. The panel stays out of your way but is always accessible via the extension's toolbar.

PLEASE NOTE

Requires the free BotGentz browser extension to run—this script does not work standalone. The script reads only the page's link tags—it does not send data anywhere, does not store page content, and does not access other tabs or browser history. The analysis is based solely on what is in the HTML; it does not fetch external pages to verify return links. Return link checks are informational—actual verification requires fetching each referenced URL, which is not performed to avoid network overhead and CORS issues. Language code validation uses a simplified BCP 47 pattern; more complex language tags (e.g., "zh-Hant", "sr-Cyrl") are not fully validated. Sites that inject hreflang tags via JavaScript may not be detected until after the page has fully rendered; use the "Check Now" button to re-scan after dynamic content loads.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.