SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    81
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Question URL Rewriting to include arrays & SEO

    I have rewritten a URL so it looks something like http://www.mywebsite.com/b:5,7,9,/c:5,7,9,/

    From an SEO standpoint, is the comma the best separator to use or is there a better character?

    Thanks

  2. #2
    SitePoint Mentor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,270
    Mentioned
    33 Post(s)
    Tagged
    5 Thread(s)
    Why would you want to pass arrays of data in your URL like that?

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    81
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I have a dynamic page which updates via ajax based on user input. The output of products listed is based on user selection, a bit like a clothes website. I want the URL to be portable, so users and copy and paste it and get directly back to THAT page layout without having to make the selections over again etc.

    I'm looking for the best blend between readability and SEO with probably more emphasis on the latter.

    Thanks

  4. #4
    SitePoint Mentor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,270
    Mentioned
    33 Post(s)
    Tagged
    5 Thread(s)
    Usually you'd pass the options via a query string, like this:
    http://www.example.com/products?b=5,7,9&c=5,7,9

    From an SEO standpoint, query strings represent options for changing how the data is displayed (eg. the order or number of items in a results list), where as in a URL like the example you gave, any change in the URL is considered a separate page (and should have different content). This: http://www.mywebsite.com/b:5,7,9,/c:5,7,9,/ would be considered a different page to this: http://www.mywebsite.com/b:5,7,9,/c:5,7,3,/

    As for the readability, that could be improved by changing the name of your variables. Going back to the list results page example, you might have something like this:
    www.example.com/products/shoes?size=9&sortby=price&sortorder=asc
    here all the query string variables are logically named, and it's easy to take a guess at what results the page is going to show me.
    Last edited by fretburner; Jun 18, 2013 at 05:22. Reason: Fighting with formatting!

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    81
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fretburner View Post
    where as in a URL like the example you gave, any change in the URL is considered a separate page (and should have different content). This: http://www.mywebsite.com/b:5,7,9,/c:5,7,9,/ would be considered a different page to this: http://www.mywebsite.com/b:5,7,9,/c:5,7,3,/
    On the one hand that's not necessarily a bad thing, afterall the pages will display different products / categories, but I have set a canonical link in the <head>... But that's now got me thinking if the URL structure would cause me problems for the canonical... Google would see multiple pages with the same canonical? hmmm...

  6. #6
    SitePoint Mentor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,270
    Mentioned
    33 Post(s)
    Tagged
    5 Thread(s)
    Quote Originally Posted by Dablue View Post
    On the one hand that's not necessarily a bad thing, afterall the pages will display different products / categories
    That being the case, then your urls should reflect that. The canonical link is only useful if you have a situation where you can access the same content via different URLs, and you want to prevent google from seeing it as duplicate content (which could adversely affect your rankings)

    It's difficult to give better advice without knowing more about your site and its structure, but you should always aim to make your URLs human-readable. URLs like http://www.mywebsite.com/b:5,7,9,/c:5,7,3,/ mean nothing to google, whereas URLs like www.mywebsite.com/products/productname and www.mywebsite.com/categoryname will help google index your site (as well as being better for your users).

  7. #7
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    81
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fretburner View Post
    It's difficult to give better advice without knowing more about your site and its structure
    Yeah, I appreciate that, it's quite a complex structure making heavy use of ajax. I've got product categories, brands, prices, product type all updatable on the page without a refresh...

    I think on reflection a better approach would be http://www.mywebsite.com/products/brands:5,7,9&categories:5,7,3 and have the canonical set to http://www.mywebsite.com/products/


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •