Hreflang Tag Checker avatar

Hreflang Tag Checker

Pricing

Pay per event

Go to Apify Store
Hreflang Tag Checker

Hreflang Tag Checker

This actor validates hreflang tags on web pages, which are critical for international SEO. It checks for proper self-referencing tags, x-default fallback, valid ISO language/region codes, duplicate values, and absolute URLs. Each page gets a validation score (0-100) and a list of specific...

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Validate hreflang tags on web pages for international SEO. Checks self-referencing, x-default, language codes, and common implementation issues.

What does Hreflang Tag Checker do?

This actor validates hreflang tags on web pages, which are critical for international SEO. It checks for proper self-referencing tags, x-default fallback, valid ISO language/region codes, duplicate values, and absolute URLs. Each page gets a validation score (0-100) and a list of specific issues to fix.

Hreflang tags tell search engines which language and regional version of a page to show to users in different countries. Incorrect hreflang implementation can cause the wrong language version to appear in search results, leading to poor user experience and lost traffic. This actor validates every aspect of your hreflang setup in one run.

The output includes a detailed breakdown of every hreflang tag found on each page, with individual validation status for each tag. You can see exactly which tags are correct, which have issues, and what needs to be fixed. Each page also receives a validation score from 0 to 100 for easy prioritization.

Use cases

  • International SEO specialist -- audit hreflang implementation across a multi-language site to ensure correct regional targeting
  • Localization manager -- verify that all translated pages are properly linked with hreflang tags after adding a new language
  • Agency SEO team -- include hreflang validation in technical SEO audits for clients with international websites
  • Web developer -- validate hreflang tag output after implementing or modifying the CMS hreflang module or plugin
  • E-commerce manager -- ensure product pages for different countries and currencies point to each other correctly for international search

Why use Hreflang Tag Checker?

  • Comprehensive validation -- checks self-referencing, x-default, language codes, duplicate values, and URL format
  • ISO code verification -- validates that language and region codes follow ISO 639-1 and ISO 3166-1 standards
  • Validation score -- each page gets a 0-100 score so you can prioritize the most critical issues
  • Batch processing -- validate hundreds of pages in a single run
  • Structured JSON output -- detailed tag-by-tag results with issue descriptions ready for spreadsheets or dashboards
  • Pay-per-event pricing -- costs just $0.001 per page checked

Input parameters

ParameterTypeRequiredDefaultDescription
urlsarrayYes--List of web page URLs to validate hreflang tags for. Each URL is checked independently.

Input example

{
"urls": [
"https://www.google.com",
"https://www.apple.com",
"https://en.wikipedia.org"
]
}

Output example

{
"url": "https://www.google.com",
"title": "Google",
"hasHreflang": true,
"hreflangTags": [
{ "hreflang": "en", "href": "https://www.google.com/?hl=en", "isValid": true, "issue": null },
{ "hreflang": "x-default", "href": "https://www.google.com/", "isValid": true, "issue": null }
],
"hasSelfReference": true,
"hasXDefault": true,
"languages": ["en", "x-default"],
"issues": [],
"issueCount": 0,
"score": 100,
"error": null,
"checkedAt": "2026-03-01T12:00:00.000Z"
}

How much does it cost?

EventPriceDescription
Start$0.035One-time per run
URL checked$0.001Per page checked

Example costs:

  • 10 URLs: $0.035 + (10 x $0.001) = $0.045
  • 100 URLs: $0.035 + (100 x $0.001) = $0.135
  • 1,000 URLs: $0.035 + (1,000 x $0.001) = $1.035

Using the Apify API

You can call Hreflang Tag Checker programmatically from your own applications using the Apify API. The following examples show how to start a run, wait for it to finish, and retrieve the results.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/hreflang-checker').call({
urls: ['https://www.google.com', 'https://www.apple.com'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/hreflang-checker').call(run_input={
'urls': ['https://www.google.com', 'https://www.apple.com'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Integrations

Hreflang Tag Checker works with all major automation and integration platforms available on Apify. Connect it to Make (formerly Integromat) or Zapier to create workflows that alert your localization team when hreflang issues are detected. Export results to Google Sheets for collaborative review across international teams. Send Slack notifications when pages fail hreflang validation. Use webhooks to receive instant callbacks when a run completes, or integrate with n8n for advanced automation pipelines. Schedule recurring runs on Apify to monitor hreflang tags as new language versions are added. All results are stored in Apify datasets and can be downloaded in JSON, CSV, or Excel format.

Tips and best practices

  • Always include a self-referencing hreflang tag -- every page should include an hreflang tag pointing to itself; missing self-references are the most common hreflang mistake
  • Add an x-default tag -- the x-default value tells search engines which page to show when no language match is found for the user
  • Use correct ISO codes -- language codes must follow ISO 639-1 (e.g., "en", "fr") and region codes must follow ISO 3166-1 (e.g., "en-US", "fr-CA")
  • Verify bidirectional linking -- if page A links to page B via hreflang, page B must link back to page A; check both sides
  • Run after adding new languages -- every time you launch a new language version, validate that all existing pages have updated hreflang tags
  • Use absolute URLs in hreflang tags -- relative URLs are not supported and will be ignored by search engines

FAQ

What are hreflang tags? Hreflang tags are HTML attributes that tell search engines which language and regional version of a page to display to users. They use the format <link rel="alternate" hreflang="en-US" href="https://example.com/en/" /> and are placed in the <head> section of the page.

What is x-default? The x-default hreflang value specifies the fallback page for users whose language or region does not match any of the specified hreflang values. It is recommended by Google for all sites using hreflang tags.

Do I need hreflang tags if I only have one language? No. Hreflang tags are only needed when you have multiple language or regional versions of the same content. If your site is in one language only, hreflang tags are unnecessary.

What is the difference between "en" and "en-US"? The code "en" targets all English-speaking users regardless of region. The code "en-US" specifically targets English-speaking users in the United States. Use region-specific codes when you have content tailored for different countries that speak the same language (e.g., "en-US" vs "en-GB").

Can hreflang tags be placed in an XML sitemap? Yes. Hreflang annotations can be placed in HTML <head> tags, HTTP headers, or XML sitemaps. This actor checks the HTML implementation. If you use sitemap-based hreflang, verify those separately.

How many URLs can I check in one run? There is no hard limit. You can validate hundreds or thousands of pages in a single run. The actor processes each URL independently and concurrently for fast results.

Does the actor check HTTP header hreflang? The actor primarily checks hreflang tags in the HTML <head> section. If your site uses HTTP Link headers for hreflang, those may not be covered by this check.