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:
-
URL analysis: The system extracts all query parameters from each crawled URL and identifies whether the URL contains any parameters at all.
-
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
- Sort parameters:
-
Header inspection: The crawler checks the HTTP
X-Robots-Tagresponse header for the presence ofnoindex(case-insensitive). -
HTML parsing: The raw HTML
<head>section is parsed to:- Locate the first
<link rel="canonical">tag and extract itshrefattribute - Check for
<meta name="robots">tags containing thenoindextoken
- Locate the first
-
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)
-
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
-
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
-
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.
-
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.
-
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
hrefis an absolute URL and does not include the same parameters as the page URL. -
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
followso links on the page are still crawled even if the page itself is excluded. -
Ensure only one canonical tag exists per page. Remove duplicate canonical tags. Audit templates or CMS plugins that inject canonical tags to prevent conflicts.
-
Do not use self-referencing canonicals on parameterized URLs. A canonical that includes the same parameters as the page URL provides no deduplication benefit.
-
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
| Field | Type | Description |
|---|---|---|
| validNoIndexPresent | Boolean | Whether 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: NoneCorrected 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: NoneCorrected 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: NoneCorrected 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
- URL has no query parameters — the page URL contains no
?with parameters, so no parameter handling is needed. - URL has parameters and valid noindex is present — the page URL contains query parameters and a
<meta name="robots" content="noindex">directive is present. - 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
- URL has parameters but no canonical and no noindex — the page URL has query parameters but neither a canonical nor a
noindexdirective is present. The issue is reported with validation errors indicating both are missing. - 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.
- 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
- Extract correct query parameter keys — when the page URL has multiple query parameters (
filter,sort,brand), the detected issue accurately lists all parameter keys. - Empty HTML — passing an empty HTML string does not throw an error.
- Empty head — passing HTML with an empty
<head>element does not throw an error. - Malformed HTML — passing unclosed or broken HTML tags does not throw an error.
- Cache validation — calling
runUrlParameterAuditmultiple 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
noindexdirective in the robots meta tag, or - A clean canonical URL (without query parameters).
When reported, the issue includes:
- A
messageof"Parameterized URL handling validation failed" - The list of
queryParamKeysdetected - The
canonicalUrl(if present) - A
validationErrorsarray describing what is missing
Pass
The issue should not be reported when:
- The page URL has no query parameters, or
- A valid
noindexdirective 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
noindexor 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
Related Production Files
toggleGroups/urlParameterAudit.jsissueCodes.jsutils/issues.js
Coverage Summary
- Covers all positive scenarios: no parameters,
noindexpresent, 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
- Google Search Central — Consolidate Duplicate URLs (Canonical) — Google Search Central
- Google Search Central — Robots Meta Tag and X-Robots-Tag — Google Search Central
- Google Search Central — URL Structure — Google Search Central