Skip to main content

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:

  1. Parse HTML
  2. Find: link[rel="canonical"]
  3. Extract href URL
  4. Check for tracking params:
    • utm_
    • fbclid
    • gclid
    • ref

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_source
  • utm_medium
  • utm_campaign
  • fbclid
  • gclid
  • ref

What to Store

FieldDB TypePurpose
canonical_urlTEXTExtracted canonical URL
canonical_has_tracking_paramsBOOLEANWhether canonical contains tracking params
tracking_parametersTEXT[]Tracking params found in canonical
canonical_cleanliness_validBOOLEANWhether 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_source
  • utm_medium
  • gclid
  • fbclid
  • ref

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_* params
  • fbclid
  • gclid
  • Tracking refs