Home / Fix guides / On-page SEO

How to Fix URL Parameters Creating Duplicate Pages

URL parameters (the bits after a question mark) can make one page reachable at many addresses. Fix it by choosing one clean address per page, pointing to it with a canonical tag, and stopping your site from creating needless variants.

URL parameters are the extra pieces after a question mark in a web address, such as ?utm_source=newsletter or ?sort=price. When one page can be reached through many of these addresses and nothing says which one is the real one, search engines see duplicates. This guide shows how to find them, fix them and keep them from returning, in plain steps.

What the problem looks like

You may never notice it by browsing, because every address shows the same page. Search engines and analytics tools see them as separate addresses:

https://www.example.com/shoes/
https://www.example.com/shoes/?sort=price
https://www.example.com/shoes/?utm_source=newsletter
https://www.example.com/shoes/?sessionid=8f3a

Common sources of parameters:

  • Campaign tracking such as utm_source, utm_medium, gclid and fbclid
  • Sorting and filtering on shop or listing pages (?sort=, ?color=, ?size=)
  • Session IDs added to the address instead of being stored in a cookie
  • Internal site search, print views, language or currency switches
  • Product variant selectors such as ?variant=

Why it matters

Search. Google groups near identical pages and chooses one to show. That is usually not a penalty, but it may not choose the address you want. Links and other signals can also get split across the versions instead of strengthening one page. On large sites, crawlers can waste time on thousands of filter combinations instead of your real pages.

Reporting. Your analytics may list the same page under many addresses, so numbers look scattered and hard to trust.

Sales and trust. A customer may share a link that contains a session ID or a filter, and an odd looking address can show up in search results. Session IDs in links can also be a privacy risk on badly built sites, because anyone who opens the shared link may land inside someone else's session.

How to check if your site has it

  1. Search Google for site:yourdomain.com inurl:? (replace the domain with yours). Results with a question mark in the address are indexed parameter pages. The search is approximate, so treat it as a quick hint.
  2. Open Google Search Console, go to the Pages report (under Indexing) and look for the reasons Duplicate without user-selected canonical and Duplicate, Google chose different canonical than user. Click each one to see example addresses.
  3. Crawl your site with a tool such as Screaming Frog (the free version crawls up to 500 addresses) and filter the list for addresses containing a question mark.
  4. In your analytics landing pages report, look for the same page appearing several times with different endings.

SiteMonday's week 1 SEO review is where this kind of problem is detected, and it comes with a written report and a ranked fix list. SiteMonday finds and explains the problem; making the change is up to you or your developer.

How to fix it

The general approach works on any platform.

  1. Sort your parameters into two groups. Some do not change the content (tracking, session IDs, sorting). Others produce a genuinely different page that people search for (for example, a category page with its own useful products). Only the first group is a duplicate problem.
  2. Add a canonical tag to every page. It goes in the <head> and names the clean address:
<link rel="canonical" href="https://www.example.com/shoes/">

The tag should point to the address without parameters, and the same tag should appear on every variant. A page pointing to itself without parameters is the safest default.

  1. Stop creating the variants. Use cookies for sessions instead of putting an ID in the address. Make sure your menus, buttons and internal links use the clean address, not one with tracking added.
  2. Redirect old session or junk addresses. If a parameter has no purpose, set up a 301 redirect from the address with it to the clean one. Do not redirect campaign parameters like utm_ that you still need for tracking, because the redirect may strip them before analytics reads them. A canonical tag is the better choice there.
  3. Handle filters deliberately. Filter combinations with no search value can point their canonical to the main category page, or use a noindex tag. Blocking in robots.txt should be a last resort for huge sites: Google cannot read a canonical tag on a page it is not allowed to open.
  4. Keep your XML sitemap clean. List only the preferred addresses.

Google retired the URL Parameters tool in Search Console in 2022, so this cannot be set there any more. It has to be done on the site itself.

Common platforms

Menu names differ between versions and themes, so treat these as pointers.

  • WordPress: SEO plugins such as Yoast SEO and Rank Math normally output a canonical tag. Check that it appears on parameter addresses too. See the WordPress guide.
  • Shopify: themes usually include a canonical tag by default. Filtered collection addresses and ?variant= links are the usual suspects. See the Shopify guide.
  • WooCommerce: look at ?orderby=, filter widgets and ?add-to-cart= links.
  • Magento: under Stores, Configuration, Catalog, Catalog, Search Engine Optimization, there are usually settings to use the canonical link tag for categories and products.
  • BigCommerce: the theme normally outputs the canonical tag. Check filtered category pages.
  • Next.js: set the canonical in the page metadata (the alternates option in the App Router), built from the clean path.
  • Google Tag Manager: it does not cause parameters by itself, but check that no tag adds parameters to your links.

How to confirm the fix worked

  • Open a parameter address, view the page source and search for canonical. It should show the clean address.
  • From a terminal, curl -s "https://www.example.com/shoes/?sort=price" | grep -i canonical shows the same thing.
  • In Search Console, use URL Inspection on a parameter address and compare the user declared canonical with the Google selected one.
  • Watch the Pages report over the next few weeks. Google needs time to recrawl, so the duplicate counts fall slowly rather than overnight.

How to stop it coming back

  • Agree on one way to build campaign links and tell everyone who creates them.
  • Recheck after installing a plugin, changing theme or adding filters, since these often introduce new parameters.
  • Keep internal links and the sitemap on clean addresses.
  • Review your indexed addresses every few months. If you have many pages that look alike for other reasons, also read about duplicate content across pages.

Step by step for your platform

Questions

Are URL parameters bad for SEO?

No, parameters themselves are fine. The problem is when many parameter addresses show the same content and nothing names the preferred one.

Is duplicate content from parameters a Google penalty?

Usually not. Google tends to pick one version and ignore the rest, but it may pick a version you did not want, and your signals get split.

Should I block parameters in robots.txt?

Only as a last resort on very large sites. Google cannot see a canonical tag on a page it is blocked from opening, so blocked pages can stay in results.

Do I need to remove utm parameters from my links?

No, keep them for tracking campaigns. Just make sure the page has a canonical tag pointing to the address without them.

Can I still use the URL Parameters tool in Search Console?

No, Google retired it in 2022. Use canonical tags, redirects and clean internal links on the site instead.

How long until Google fixes the duplicates?

It depends on how often your site is crawled, but expect a few weeks. Check the Pages report in Search Console to follow progress.

Related problems