4

What is the correct/recommended way from a SEO point of view to pass multiple parameter values for a single key in a URL.

e.g. my online store sells the watches that I'd like filtering using facets and the URL changes. Available watch colors are:

  • black
  • navy-blue
  • pinkish-red
  • shades-of-the-forest
  • white

Google says use key-value pairs like:

watches?key1=value1&key2=value2 

But what is the actual syntax for a key with multiple values and those values include hyphens? Say someone wants to filter by three colors: navy-blue, pinkish-red and shades-of-the-forest

watches?color=navy-blue-pinkish-red-shades-of-the-forest

which, because of the hyphenated values looks like one long value

I could use camel caps

watches?color=navyBlue-pinkishRed-shadesOfTheForest

But I want my URLs to be all lowercase

I could use underscores

watches?color=navy-blue_pinkish-red_shades-of-the-forest

But I wanted to avoid mixing underscores and hyphens

I could use an array of brackets:

watches?color[]=navy-blue&color[]=pinkish-red&color[]=shades-of-the-forest

I seem to think I read somewhere Google advised against this

I see Debenhams use colons like this:

watches/navy-blue:pinkish-red:shades-of-the-forest?#filter

But aren't colons special characters in a URL? They don't look right to me.

I know how to handle all of them from a technical point of view but what is the most SEO-friendly syntax?

2
  • Just thought of another one: watches?color1=navy-blue&color2=pinkish-red&color3=shades-of-the-forest
    – Gdev
    Dec 16, 2020 at 12:48
  • I think Stephen has answered your issue re SEO. However, I'm pretty sure I've used the ":" in the past and then split the array on the destination page.when using REST
    – Trebor
    Dec 22, 2020 at 3:03

2 Answers 2

4

You shouldn't try to make faceted navigation SEO friendly. No matter how you do it, it isn't going to be. Faceted navigation is for users once they get to your site, not for getting your content indexed in search engines.

Faceted navigation is not appropriate for search engines because it produces a near infinite number of URLs. Most of the combinations are going to be very low interest. The pages are going to have content that duplicates other pages. When several filter are applied, there may only be a couple of products listed which would appear to search engines as thin content.

You should make your entire faceted navigation non-crawlable. To make it easy to program, just use standard name value pairs in URL parameters:

/filter?product=watches&color=navy+blue&color=pinkish+red

Then disallow search engines using the following in robots.txt:

Disallow: /filter

You can use this faceted navigation to create a limited number of pages for search engines. It could be useful to have page of navy-blue watches. You could use mod_rewrite to apply just a single filter to a list of products:

RewriteRule /watches/navy-blue /filter?product=watches&color=navy-blue

It would not be appropriate to allow search engine to crawl more than one facet at a time. There are too many combinations. Search engines would see you generating tons of pages with duplication and thin content.

About "SEO friendly" URLs

It is common to hear that URL parameters are not SEO friendly and that you should always use rewrite to create more SEO friendly URLs using only the URL path. That isn't strictly true. Google doesn't really care what your URLs look like. There are no direct ranking benefits from creating such URLs. Any of the following could rank just fine in search engines:

  • /some-page
  • /show?content=some-page
  • /show?id=3932
  • /content3932/some-page

Even having keywords in your URLs doesn't boost your rankings directly. So why the focus on SEO friendly URLs? They help with SEO indirectly.

  1. "SEO friendly" URLs are actually "user friendly" URLs. The best URLs for users are descriptive, easy to type, and memorable. Query parameters introduce punctuation (?, &, and =) into URLs that make them that much harder for users to type and remember. Of the URLs above /some-page is the best for users. Not having words in the URL makes it less descriptive. Having a content ID (while sometimes unavoidable for DB driven websites) makes the URL harder to remember and type.

  2. Search engines don't like inconsistency. Every piece of content should be available at exactly one URL. The URL shouldn't change over time. If there are URL variations that could show the same content you should pick one to make the "canonical" version. All other variations should redirect to it or use meta canonical tags to point to it. All links on your site should point to the canonical version.

    URL parameters can create lots of variation, especially with multiple parameters. Most of the time web apps don't care about about the order of parameters, or the presence of extra unused parameters. Additional parameters may change only a small portion of the page or just be used for tracking. That is a disaster for SEO because of the inconsistency.

    SEO friendly URLs force you to constrain the parameters to a specific order without any extra parameters. It discourages using multiple parameters, each of which only changes a portion of the page.

Moving parameters to the path isn't all it takes to make the URLs friendly. It is more about limiting the URLs to a reasonable number of variations. Any scheme you come up with that allows multiple arbitrary parameters forced into the URL path isn't going to be SEO friendly anymore.

0

I think most of the approaches in the OP request are less then ideal, if not problematic from an SEO POV.

If the framework could be coerced into allowing it I would drop the "&" but especially the "?" bits for parts you are wanting searchable and make it appear as a path. I might be inclined to use "-" or similar as a separator and "_" or similar as a space.

I would also argue that having parameters with multiple conflicting values (eg more then 1 color) might be counterproductive, and I'd rather return 2 results to Google - one page for each item. If you think about it from an end user perspective, a user who adds a color to a particular search is likely to want that color - Everyone is likely going to be happier if the Google link goes straight to the color variant page they choose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy