Canonical Tag Validator avatar

Canonical Tag Validator

Pricing

$4.99/month + usage

Go to Apify Store
Canonical Tag Validator

Canonical Tag Validator

Canonical tag validator that checks any webpage for missing, duplicate, or misconfigured canonical URLs — so SEO teams and developers can fix canonical issues before they damage search rankings.

Pricing

$4.99/month + usage

Rating

0.0

(0)

Developer

ZeroBreak

ZeroBreak

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Canonical Tag Validator — Check & Fix Canonical URL Issues on Any Website

Canonical tag validator that checks any webpage for missing, duplicate, or misconfigured canonical tags. Instantly audit hundreds of URLs and get a detailed report of canonical tag issues that could be hurting your search rankings. Built-in cost safeguards prevent accidental overuse — set URL limits and timeouts to stay in control of your Apify spending.

Use Cases

  • SEO auditing — Automatically detect missing or broken canonical tags across your entire site before they damage your search rankings
  • Site migration validation — Verify that canonical tags are correctly pointing to the new domain after a website migration
  • Duplicate content prevention — Find pages with mismatched or cross-domain canonical URLs that could cause duplicate content penalties
  • Technical SEO monitoring — Regularly validate canonical tag health across key landing pages and product URLs
  • QA testing — Check canonical tags on staging environments before publishing new pages to production
  • Agency reporting — Batch-validate canonical tags for multiple client sites and export results for review

Input

ParameterTypeDefaultDescription
urlstringA single URL to validate the canonical tag for
urlsstring[]List of URLs to validate (enter one per line in the UI)
maxUrlsinteger100Maximum URLs to process per run (hard cap: 1000). Prevents accidental overuse
timeoutSecsinteger300Overall run timeout in seconds. Actor stops and saves results when reached
requestTimeoutSecsinteger30Per-request timeout. Slow pages are skipped after this limit
followRedirectsbooleantrueFollow HTTP redirects to detect canonical mismatches caused by redirect chains

Example Input

{
"urls": [
"https://example.com",
"https://example.com/about",
"https://example.com/products"
],
"maxUrls": 100,
"timeoutSecs": 300
}

Output

The actor stores results in a dataset. Each entry contains all 13 fields:

{
"url": "https://apify.com",
"finalUrl": "https://apify.com/",
"statusCode": 200,
"hasCanonicalTag": true,
"canonicalUrl": "https://apify.com",
"hasCanonicalHeader": false,
"canonicalHeaderUrl": null,
"isValid": true,
"isSelfReferencing": true,
"issues": [],
"pageTitle": "Apify: Full-stack web scraping and data extraction platform",
"checkedAt": "2026-02-26T09:40:12.345678+00:00",
"error": null
}
FieldTypeDescription
urlstringThe original URL that was checked
finalUrlstringFinal URL after following redirects
statusCodeintegerHTTP status code of the response
hasCanonicalTagbooleanWhether an HTML <link rel="canonical"> tag was found
canonicalUrlstringThe canonical URL from the HTML tag
hasCanonicalHeaderbooleanWhether a Link HTTP header with rel="canonical" was found
canonicalHeaderUrlstringThe canonical URL from the HTTP header
isValidbooleantrue if no issues were found with the canonical setup
isSelfReferencingbooleanWhether the canonical tag points back to the same page
issuesarrayList of specific problems found (empty if valid)
pageTitlestringThe page's <title> tag content
checkedAtstringISO 8601 timestamp of when the check ran
errorstringError message if the URL could not be fetched

What Issues Does This Actor Detect?

The canonical tag validator checks for these common SEO problems:

  1. Missing canonical tag — No <link rel="canonical"> or Link header found
  2. Multiple canonical tags — More than one canonical tag on a single page
  3. Empty href — Canonical tag exists but the href attribute is blank
  4. Relative canonical URL — Canonical should always be a fully qualified absolute URL
  5. Protocol mismatch — Page served over HTTPS but canonical points to HTTP (or vice versa)
  6. Cross-domain canonical — Canonical points to a different domain (flagged for verification)
  7. Tag vs header conflict — HTML canonical tag and HTTP Link header specify different URLs

How It Works

  1. Collects URLs from the url and urls input fields, deduplicates them, and caps at maxUrls
  2. Fetches each page with a realistic browser User-Agent, optionally following redirects
  3. Parses the HTML for <link rel="canonical"> tags and checks HTTP Link headers
  4. Validates the canonical URL for correctness (absolute URL, matching protocol, same domain)
  5. Reports issues found and pushes structured results to the Apify dataset
  6. Stops automatically when timeoutSecs is reached, saving all results collected so far

Cost Safeguards

This actor includes built-in protections against accidental overuse:

  • URL capmaxUrls limits how many pages are processed per run (default: 100, max: 1000)
  • Overall timeouttimeoutSecs stops the actor after a set duration (default: 5 minutes)
  • Per-request timeout — Slow or unresponsive pages are skipped instead of blocking the run
  • Progress reporting — Real-time status messages show exactly which URL is being checked

FAQ

Can this actor check canonical tags on JavaScript-rendered pages? This actor fetches raw HTML, which works for the vast majority of websites. Most canonical tags are in the initial HTML <head> and do not require JavaScript rendering. If your site injects canonical tags via client-side JavaScript, the actor may not detect them.

How many URLs can I check in one run? Up to 1000 URLs per run (controlled by the maxUrls setting). The default is 100. For larger audits, run the actor multiple times with different URL batches.

Will this actor follow redirects? Yes, by default. This helps detect canonical mismatches caused by redirect chains. You can disable this with the followRedirects option.

What happens if the actor times out? All results collected before the timeout are saved to the dataset. You'll see a warning in the logs indicating how many URLs were processed before the timeout was reached.

Does this validate that the canonical URL actually exists? The actor validates the canonical tag's structure and correctness (absolute URL, protocol, domain). It does not make a second request to verify the canonical URL resolves — that would double the number of HTTP requests and increase costs.

Integrations

Connect Canonical Tag Validator with other apps and services using Apify integrations. You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and many more. You can also use webhooks to trigger actions whenever results are available.