Skip to Content
URL Parameter AuditIssue 111

Parameterised URLs left indexable

What Is This Issue

This issue checks whether URLs containing query parameters (like ?sort=, ?filter=, ?ref=) have proper SEO directives to prevent them from being indexed as duplicate content.

A URL passes this check if it has at least one of the following:

  • A canonical tag pointing to a clean URL (without the same parameters)
  • A noindex directive in the HTML meta tags
  • A noindex directive in the HTTP response headers (X-Robots-Tag)

Example:

  • Base URL: https://example.com/shoes
  • Parameterized URL: https://example.com/shoes?color=red&sort=price
  • Passing: The parameterized URL has <link rel="canonical" href="https://example.com/shoes">
  • Failing: The parameterized URL has no canonical or noindex directive

Why Is This Important

Unhandled parameterized URLs negatively impact SEO in several ways:

  • Duplicate content: Search engines treat each unique URL with different parameters as a separate page, even if the content is nearly identical. This creates duplicate content clusters that confuse search engines about which version to rank.

  • Crawlability: Crawlers waste valuable crawl budget on low-value parameterized URLs instead of discovering and indexing important pages.

  • Rankings: Link equity and ranking signals are split across multiple near-duplicate URLs instead of consolidating on the canonical page.

  • Indexability: Pages with little unique content enter the search index, reducing the overall quality signal of the site.

Resolving this issue improves the overall SEO health score by consolidating duplicate content signals, optimizing crawl budget usage, and ensuring search engines index the correct version of each page.

How XeoPix Detects This

XeoPix follows a logical detection process to identify unhandled parameterized URLs:

  1. URL analysis: The system extracts all query parameters from each crawled URL and identifies whether the URL contains any parameters at all.

  2. Parameter classification: Extracted parameter keys are matched against known SEO-sensitive patterns:

    • Sort parameters: sort, order, orderby, sortby
    • Filter parameters: filter, facet, color, size, brand, category, type, material, price, rating
    • Referral/tracking parameters: ref, source, from, via, campaign
    • Pagination parameters: page, p, pg, offset, start
    • Display mode parameters: view, display, layout, tab
  3. Header inspection: The crawler checks the HTTP X-Robots-Tag response header for the presence of noindex (case-insensitive).

  4. HTML parsing: The raw HTML <head> section is parsed to:

    • Locate the first <link rel="canonical"> tag and extract its href attribute
    • Check for <meta name="robots"> tags containing the noindex token
  5. Canonical evaluation: If a canonical URL is found:

    • It is normalized (relative URLs are resolved against the page’s base URL)
    • The system checks whether the canonical URL contains none of the same parameter keys as the page URL
    • It verifies whether the canonical is self-referencing (identical to the page URL including parameters)
  6. Handling determination: A URL is considered “handled” if at least one condition is met:

    • Noindex header is present
    • Noindex meta tag is present
    • Canonical is present, points to a clean URL (without the same parameters), and is not self-referencing
  7. Issue triggering: An issue is raised when a URL has query parameters but lacks proper handling (no valid canonical or noindex directive).

How To Fix

  1. Audit all parameterized URLs on the site. Crawl server access logs or sitemap XML to collect all URLs containing query parameters. Group them by parameter key to understand the scope.

  2. Categorize parameters by SEO intent:

    • Parameters that produce near-duplicate content (sort, filter, display): apply canonical or noindex.
    • Parameters that track referral or campaign source (ref=, utm_*): apply canonical pointing to the clean base URL.
    • Parameters used for pagination (page=): apply canonical pointing to the first page of the series.
  3. Add a canonical tag pointing to the clean URL. In the <head> of every parameterized page, include a canonical tag with an absolute, parameter-free URL:

    <link rel="canonical" href="https://example.com/shoes" />

    Ensure the href is an absolute URL and does not include the same parameters as the page URL.

  4. Alternatively, apply a noindex directive. For parameterized pages that should never appear in search results, add to the <head>:

    <meta name="robots" content="noindex, follow" />

    Use follow so links on the page are still crawled even if the page itself is excluded.

  5. Ensure only one canonical tag exists per page. Remove duplicate canonical tags. Audit templates or CMS plugins that inject canonical tags to prevent conflicts.

  6. Do not use self-referencing canonicals on parameterized URLs. A canonical that includes the same parameters as the page URL provides no deduplication benefit.

  7. Verify the fix via re-crawl. After implementing canonical or noindex tags, re-crawl the affected parameterized URLs to confirm the directives are present and correctly formed.

What We Store

Storage Level

Page Level


Database Table / Prisma Model

PageUrlParameterAudit


Fields Used

FieldTypeDescription
validNoIndexPresentBooleanWhether a valid noindex directive is present on URLs with query parameters

Detection Dependencies

  • HTML Document
  • HTTP Response Headers

Examples

Example 1: Basic Parameterized URL with Canonical

Scenario: An e-commerce product listing page with sort parameter.

Problematic state (failing):

URL: https://example.com/shoes?sort=price_asc Canonical: None Noindex: None

Corrected state (passing):

URL: https://example.com/shoes?sort=price_asc Canonical: <link rel="canonical" href="https://example.com/shoes" />

Example 2: Tracking Parameter with Canonical

Scenario: A product page with referral tracking parameter.

Problematic state (failing):

URL: https://example.com/shoes?ref=newsletter Canonical: None Noindex: None

Corrected state (passing):

URL: https://example.com/shoes?ref=newsletter Canonical: <link rel="canonical" href="https://example.com/shoes" />

Example 3: Noindex on Low-Value Parameterized Page

Scenario: A product page with multiple filter parameters that creates near-duplicate content.

Problematic state (failing):

URL: https://example.com/shoes?color=red&size=42&brand=nike Canonical: None Noindex: None

Corrected state (passing):

URL: https://example.com/shoes?color=red&size=42&brand=nike Noindex: <meta name="robots" content="noindex, follow" />

Unit Test

Test File

__tests__/seo-audit-checks/urlParameterAudit/issue-214-parameters-handled-canonical.test.js

Purpose

Validates that parameterized URLs are properly handled with either a noindex directive or a clean canonical URL (without query parameters).

Tested Function

runUrlParameterAudit from toggleGroups/urlParameterAudit.js

Issue Information

  • Issue Number: 214
  • Issue Code: parameters_handled_canonical
  • Toggle Group: urlParameterAudit

Test Scenarios

Positive Test Cases

  1. URL has no query parameters — the page URL contains no ? with parameters, so no parameter handling is needed.
  2. URL has parameters and valid noindex is present — the page URL contains query parameters and a <meta name="robots" content="noindex"> directive is present.
  3. URL has parameters and clean canonical is present — the page URL contains query parameters and a <link rel="canonical"> pointing to a clean URL (without query parameters) is present.

Negative Test Cases

  1. URL has parameters but no canonical and no noindex — the page URL has query parameters but neither a canonical nor a noindex directive is present. The issue is reported with validation errors indicating both are missing.
  2. URL has parameters and canonical contains parameters — the page URL has query parameters and the canonical URL also contains query parameters, meaning the canonical is not clean.
  3. Validation errors when canonical is missing — when the canonical is missing entirely, the detected issue includes both "Canonical URL is missing" and "No noindex directive found on parameterized URL" validation errors.

Edge Cases

  1. Extract correct query parameter keys — when the page URL has multiple query parameters (filter, sort, brand), the detected issue accurately lists all parameter keys.
  2. Empty HTML — passing an empty HTML string does not throw an error.
  3. Empty head — passing HTML with an empty <head> element does not throw an error.
  4. Malformed HTML — passing unclosed or broken HTML tags does not throw an error.
  5. Cache validation — calling runUrlParameterAudit multiple times with the same context does not duplicate issues; results are correctly cached.

Expected Outcome

Fail

The issue should be reported when a parameterized URL does not have either:

  • A noindex directive in the robots meta tag, or
  • A clean canonical URL (without query parameters).

When reported, the issue includes:

  • A message of "Parameterized URL handling validation failed"
  • The list of queryParamKeys detected
  • The canonicalUrl (if present)
  • A validationErrors array describing what is missing

Pass

The issue should not be reported when:

  • The page URL has no query parameters, or
  • A valid noindex directive is present, or
  • A clean canonical URL (without query parameters) is present.

Validation

  • Correct issue detection when parameter handling is missing
  • No issue detection when noindex or a clean canonical is provided
  • Accurate extraction of query parameter keys from the page URL
  • Validation errors are correctly populated for missing canonical and missing noindex
  • Graceful handling of empty and malformed HTML
  • Cache behaviour prevents duplicate issue entries on repeated calls
  • toggleGroups/urlParameterAudit.js
  • issueCodes.js
  • utils/issues.js

Coverage Summary

  • Covers all positive scenarios: no parameters, noindex present, clean canonical present
  • Covers all negative scenarios: missing both canonical and noindex, non-clean canonical, missing canonical
  • Covers query parameter key extraction validation
  • Covers error resilience: empty HTML, empty head, malformed HTML
  • Covers cache deduplication behaviour

References

Last updated on