tags:

views:

231

answers:

4

Hi hopefully a quick and simple question with a quick and simple answer!

Which of the following would be better for SEO purposes

/news?pg=2

or

/news/2/

Does the second one dilute the page rank by being an extra folder level in? Does then outweigh the fact that the pg reference is in the querystring and therefore not a 'page' in itself.

Cheers, Steve

A: 

For SEO purposes and to get more towards being RESTful the second is a much better option.

Being an extra folder in does not dilute page rank: However having symbols in your url certainly makes it harder for people to navigate your site. If you have a proper sitemap, the extra levels of folders won't be too much of a cause for concern when it comes to spiders unless the folder structure is very very deep, and your site will be much better organized.

Edited to address comments.

AlbertoPL
The second isn't more RESTful at all. If anything I would say the first one is but there's not much between them.
Garry Shutler
The number would have to change to the actual article, and that would make it restful.
AlbertoPL
@Gary: Seems to be RESTful enough for the purpose being considered.When deciding between #1 and #2, you also have to remember that GET variables can cause duplicate content issues with search engines, thus weakening your ranking. #2 is better because you're avoiding confusion between /news/ and any variants that require variables to change the content. It also reduces the need to declare what the canonical version of the page is, because /news/, news/2/, news/3/, etc are all unique URL destinations without even considering the query string.
Robert Elwell
Its not a page that displays an article, it will display Page 2 of a news listing for example.
Stibstibstib
@Robert I completely disagree :) Due to the fact that it is paging we are talking about the meaning of whichever URI format you use is going to change resulting in duplicate content issues.
Garry Shutler
+2  A: 

They are both unique URIs so I doubt there's much difference SEO wise.

What I would do is this:

/news?page=2

This, in a RESTful sense, is saying give me page 2 of all the news items.

Then this URI:

/news/2/{title of news item}

Would refer to a news item with the ID of 2, only including the title of the article for SEO purposes.

Garry Shutler
I agree, not sure what all this REST talk has to do with paging though
Andrew Bullock
Not much, but others starting using REST in their answers (wrongly IMO) so I thought I'd give my own answer.
Garry Shutler
Thanks Garry, that makes sense to me, I'll just wait for a bit longer to see if anyone else has anything to say. For the articles themself I've implemented with the following /news-article,the-title-of-the-article,1 We thought that would be the best option.
Stibstibstib
No problem. I think the combination of title and id (whichever way round) is the best compromise between SEO, performance and safety against editing (using the id for retrieval instead of title means you can change the title without breaking links referring to the old title).
Garry Shutler
A: 

I agree that you should choose scheme #2, but with the following proviso:

I'm imagining that you're using this for a news aggregation page with links to each news item and maybe a bit of the first paragraph. This would mean that the variable you're passing has to do with pagination, and not the ID of the news item.

If you're using this scheme for news items, what you should really be doing is something more like /news/man-bites-dog/ or /news/paris-hilton-did-something/ -- basically, lowercase your headline and join it with a dash. It may mean you'll have to have unique news story titles and you'll have to look them up by name rather than an indexed ID, but if you're actually worried about search optimization, the slight performance decrease is nothing compared to the strength of the text you're optimizing for in your URL.

Robert Elwell
A: 

Although Search Engines can now spider dynamic URLs (ex: news.php?id=23423), it is now standard practice to follow a URL rewrite for better readability (ex: /news/23423/).

Ricky