Canonical Contains Clean URLs
Issue No: 218
Category: URL Parameter Audit Issue Type: Issue Priority: Important
Description
Canonical URLs should not contain tracking parameters like utm_source, fbclid, or gclid. Canonical tags should always point to clean URLs.
How We Capture It
Where to Find
Inside HTML <head>:
<link rel="canonical"
href="https://site.com/page">
How to Get It
Crawler should:
- Parse HTML
- Find:
link[rel="canonical"] - Extract href URL
- Check for tracking params:
utm_fbclidgclidref
Detailed Capture Flow
When the crawler parses the HTML response, it extracts the canonical URL from the <head> section.
Canonical Extraction Flow
Crawler searches for:
<link rel="canonical" href="https://site.com/page">
The crawler then:
- Extracts canonical href
- Normalizes the URL
- Parses query parameters
- Checks for tracking parameters
Tracking Parameters Checked
utm_sourceutm_mediumutm_campaignfbclidgclidref
What to Store
| Field | DB Type | Purpose |
|---|---|---|
canonical_url | TEXT | Extracted canonical URL |
canonical_has_tracking_params | BOOLEAN | Whether canonical contains tracking params |
tracking_parameters | TEXT[] | Tracking params found in canonical |
canonical_cleanliness_valid | BOOLEAN | Whether canonical URL is SEO-clean |
Condition for Trigger
Trigger Rule 1 — Tracking Params Inside Canonical
- Target Field:
canonical_has_tracking_params - Evaluation Logic:
= TRUE - Severity: IMPORTANT
- Diagnostic Message:
Canonical URL contains tracking parameters. This may create duplicate indexing and canonicalization issues.
Sources
Long Description
Canonical tags tell Google which version of a page should be treated as the main/original version.
Good canonical:
<link rel="canonical" href="https://site.com/shoes">
Bad canonical:
<link rel="canonical" href="https://site.com/shoes?utm_source=facebook">
Tracking parameters are only used for analytics and marketing. They should never become the official canonical URL.
Problems caused:
- Duplicate URL signals
- Crawl inefficiency
- Incorrect indexing
- Tracking URLs appearing in search systems
Common tracking params:
utm_sourceutm_mediumgclidfbclidref
Crawler should detect these automatically.
SEO Impact
Canonical tags help search engines understand:
- The preferred page version
- Duplicate URL consolidation
- Indexing priorities
Tracking parameters should never become canonical URLs because they:
- Generate duplicate signals
- Pollute indexing systems
- Waste crawl budget
- Create inconsistent URL clustering
Common Failure Scenarios
1. Marketing URLs Become Canonical
<!-- BAD -->
<link rel="canonical"
href="https://site.com/page?utm_source=facebook">
2. Analytics URLs Indexed by Google
Tracking URLs become:
- Crawlable
- Indexable
- Shareable
This creates duplicate URL clusters.
Diagnostic Output Example
Canonical URL contains tracking parameter:
utm_source
Affected canonical:
https://site.com/page?utm_source=facebook
How to Fix
Use clean canonical URLs without tracking parameters:
<!-- GOOD -->
<link rel="canonical" href="https://site.com/page">
<!-- BAD -->
<link rel="canonical" href="https://site.com/page?utm_source=facebook">
Remove from canonical href values:
utm_*paramsfbclidgclid- Tracking refs