Reputation: 23542
Concerning search engine optimization I wonder what the best practice is to write parameters in a url. Should I place parameter names? Does an id value has a negative effect on search engines?
Here are some options that come to mind:
/project/pid/171/name/my_funny_name
/project/171/my_funny_name
/project/my_funny_name
Upvotes: 1
Views: 190
Reputation: 56
Having an id value in your url won't have a negative effect, but you should definitely add words before or after your id for SEO. What I personnaly like is trying to have a "logical" structure in the url, with id at the beginning, like this :
/123_my-category/456_my-great-stuff
Concerning the underscore, you should rather use "-", as it is considered as the word separator while _ is more for lisibility, but it's like having the words tied to each other.
Upvotes: 0
Reputation: 4634
In the url, you want AT MINIMUM
, the keywords that people will be searching for to find the page in question. The id's, in your case, should not have a negative affect.
Upvotes: 0
Reputation:
Good rule is less params is better. If you need numerical id, 2nd option is quite good, if you force my_funny_name
part to be unique, you may rely only on this as id. However keep in mind, that if you change name, url will be broken.
Also remember to avoid double names for same content, like /project/171/my_funny_name
and /project/171/my_old_name
. Try to use <link rel="canonical" href="http://example.com/project/171/my_funny_name">
Upvotes: 1