Canonical Tag Validator
Pricing
$4.99/month + usage
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
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
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
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | — | A single URL to validate the canonical tag for |
urls | string[] | — | List of URLs to validate (enter one per line in the UI) |
maxUrls | integer | 100 | Maximum URLs to process per run (hard cap: 1000). Prevents accidental overuse |
timeoutSecs | integer | 300 | Overall run timeout in seconds. Actor stops and saves results when reached |
requestTimeoutSecs | integer | 30 | Per-request timeout. Slow pages are skipped after this limit |
followRedirects | boolean | true | Follow 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}
| Field | Type | Description |
|---|---|---|
url | string | The original URL that was checked |
finalUrl | string | Final URL after following redirects |
statusCode | integer | HTTP status code of the response |
hasCanonicalTag | boolean | Whether an HTML <link rel="canonical"> tag was found |
canonicalUrl | string | The canonical URL from the HTML tag |
hasCanonicalHeader | boolean | Whether a Link HTTP header with rel="canonical" was found |
canonicalHeaderUrl | string | The canonical URL from the HTTP header |
isValid | boolean | true if no issues were found with the canonical setup |
isSelfReferencing | boolean | Whether the canonical tag points back to the same page |
issues | array | List of specific problems found (empty if valid) |
pageTitle | string | The page's <title> tag content |
checkedAt | string | ISO 8601 timestamp of when the check ran |
error | string | Error message if the URL could not be fetched |
What Issues Does This Actor Detect?
The canonical tag validator checks for these common SEO problems:
- Missing canonical tag — No
<link rel="canonical">orLinkheader found - Multiple canonical tags — More than one canonical tag on a single page
- Empty href — Canonical tag exists but the
hrefattribute is blank - Relative canonical URL — Canonical should always be a fully qualified absolute URL
- Protocol mismatch — Page served over HTTPS but canonical points to HTTP (or vice versa)
- Cross-domain canonical — Canonical points to a different domain (flagged for verification)
- Tag vs header conflict — HTML canonical tag and HTTP
Linkheader specify different URLs
How It Works
- Collects URLs from the
urlandurlsinput fields, deduplicates them, and caps atmaxUrls - Fetches each page with a realistic browser User-Agent, optionally following redirects
- Parses the HTML for
<link rel="canonical">tags and checks HTTPLinkheaders - Validates the canonical URL for correctness (absolute URL, matching protocol, same domain)
- Reports issues found and pushes structured results to the Apify dataset
- Stops automatically when
timeoutSecsis reached, saving all results collected so far
Cost Safeguards
This actor includes built-in protections against accidental overuse:
- URL cap —
maxUrlslimits how many pages are processed per run (default: 100, max: 1000) - Overall timeout —
timeoutSecsstops 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.