Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is just an ID in the URL path a bad idea for SEO?

Tags:

url

seo

Why is it a bad idea to have a ID in the URL in terms of SEO? How does this URL http://example.com/user/1234 hurt SEO?

Can someone give me a practical example where search engine rankings are worse?

like image 955
Tower Avatar asked May 26 '09 13:05

Tower


2 Answers

The reason people are saying that {ID} in the URL is bad is due to the way search engine algorithms work. When a search term is located in the actual URL, it is weighted much more heavily than the content of the page, etc.


For example:

<!-- http://example.com/blog/57 -->
<html><head><title>An article on search engine optimization</title>...

vs

<!-- http://example.com/blog/an-article-on-search-engine-optimization -->
<html><head><title>An article on search engine optimization</title>...

If you do a search in Google for "Search Engine Optimization" the second page, the one with the slug in the url will weight as a better result than the one with only the id.


You can deal with this in the same way that stack overflow deals with this issue:

http://stackoverflow.com/questions/{id}/{slug}
http://stackoverflow.com/questions/910683/why-is-id-in-the-url-a-bad-idea

The combined id and slug format really helps you achieve the best of both worlds. You get the ease of programming by retrieving records by {id}, but you also retain the optimized search URL because of the {slug}.

like image 195
Astra Avatar answered Oct 21 '22 18:10

Astra


Well, my name is Sudhir Jonathan, so if I want people to find me on your site, example.com/user/sudhir-jonathan is much much better than example.com/user/1234. Simply because the object of your page - "Sudhir Jonathan" - is now present in the url itself. This is a big win.

Similarly, example.com/articles/how-to-bake-a-cake is ranked much higher than example.com/articles/2379797 for the search term "bake a cake".

like image 23
Sudhir Jonathan Avatar answered Oct 21 '22 18:10

Sudhir Jonathan