tags:

views:

457

answers:

6

Hello people. Well, my question is simple.

Does the ID affect the position of a webpage on Google ? I have links like this http://example.com/news/title-slug/15/ and people say to me that I should remove the ID from the URL.

And I belive that is not true. By my logic, you can't depend on the title's slug. I know it should work perfectly fine if there aren't two pages that have the same title, but why should I remove the ID if there is no harm when it's there.

+2  A: 

I think your fine leaving it in. Seems to make sense as you get the element for identification and the element for being descriptive. It is done on here after all.

Mark Davidson
+9  A: 

Yes, leave it there.

Google has no business trying to second-guess what each element of a URL represents and changing its index based on that.

URLs by their nature can map to any resource, and I'm pretty sure Google recognises that. All you should do is ensure that multiple URLs don't have the same content by using redirects. So, for example, http://example.com/news/wrong-title-slug/15/ should redirect back to http://example.com/news/title-slug/15/ rather than just echo back the same page. Google doesn't really like duplicate content.

Gareth
+2  A: 

Zeus won't strike you down for it. I prefer not to have meaningless numbers in there because it's not very attractive or semantic.

Chuck
+7  A: 

It's fine.

But I would not put that behind the title-slug though. Some url might get more confusing than the others.

http://example.com/entry/how-to-solve-question-45/15

a better one would be :

http://example.com/entry/15/how-to-solve-question-45

Besides, you can't really rely on just the title-slug, because changing the title of an entry means breaking user's bookmark. Not to mention that it is faster to retrieve an entry from the database by an integer ID instead of an url-slug.

andyk
Just a minor point - example.com is a reserved domain for a reason; although not many people would bother checking it based on your post blablabla.com is an actual resolving domain. Apart from that, good point.
Cebjyre
Good point. Changed. Thanks Cebjyre. :)
andyk
+1  A: 

Having the id will NOT hurt your SEO rankings. Having the slug there ensures that the page's main keywords will be indexed so it's all good.

allesklar
+2  A: 

The problem here is not whether Google will accept it, but whether or not doing so is user-friendly.

A common reason for keeping the ID in a URL is to ensure that the URL is unique. For example, if two people on here were to create a question named "Jon Skeet Facts" we'd have a problem, whereas with the ID the users are aware that they are two different questions with the same title. This is the same as with relational databases where a unique identifier is required.

In essence, why care what Google thinks? The whole Search Engine Optimisation industry is a farce, and this is coming from someone who has been paid more than once as a SEO Consultant. Why follow what Google wants when you can map Google's intentions by making your website perfect for the user? If you make a good website Google will reward you. The ID has a reason to be there, so keep it in.

EnderMB