Should I add colour, size and filter URLs like ?color=red&size=12 to my sitemap?

Usually not. Filters and colour or size parameters create dozens of addresses for what is essentially one page, and a sitemap is where the single version you want in search belongs. List the main product page and leave the combinations out. If a parameter page is genuinely its own page, the tool accepts it and writes & the way XML requires.

Published · 3 min read

Why not list every combination?

An oud oil product with three box colours and four sizes gives twelve combinations, and every different parameter order is yet another address. All of them show roughly the same product. Listing them all tells a search engine you have twelve pages worth attention when you really have one.

A sitemap is not a list of every possible address; it is a list of the pages you want people to find in search. The plain product page, https://example.com/oud, is usually enough.

The tool cannot tell these are one page

We pasted four lines: the product page, then ?color=red, then ?color=red&size=12, then ?size=12&color=red. All four went into the file and none was removed as a duplicate. The tool only drops exact repeats, and the last two differ in parameter order, so to it they are different addresses even though they show the same content. What goes in the sitemap is your call.

When a parameter page does earn a place

  • When the parameter changes the content substantially, such as ?lang=en on a site that serves its English version that way.
  • When your platform addresses products with a parameter such as ?id=15, so that is the page's only URL.
  • Pagination like ?page=2 in a large category can be useful if it holds products found nowhere else. Decide based on your site.

In those cases paste the URL as it is. This is what the tool wrote for a link with two parameters:

<url> <loc>https://example.com/oud?color=red&amp;size=12</loc> </url>

The & became &amp; because XML gives that character a special meaning. That is not an error, and search engines read it as a plain &. Do not type &amp; yourself in the list, or it turns into &amp;amp;.

Steps

  1. Export your list of URLs and remove every line carrying filter, sort, colour or size parameters.
  2. Keep parameters that identify a genuinely separate page.
  3. Paste the list into the XML sitemap generator and download the file.

If filter links are eating crawl effort on a large store, that is a robots.txt matter rather than a sitemap one, and you can prepare and test the rule in the Robots.txt builder. Just never block in robots.txt a URL you listed in the sitemap; those two messages contradict each other. On hosted stores such as Salla and Zid the platform builds the sitemap, so check what it serves rather than making your own.

Common questions

Will filter URLs in the sitemap hurt my site?

We cannot promise any particular effect, but they make the sitemap less clear. Better to list only pages you want in search.

Does the tool strip parameters automatically?

No. It removes only the part after #. Parameters after ? stay as they are.

Are Arabic parameter values written correctly?

Yes, Arabic characters in the URL are percent-encoded as %XX.