I work on a web site where we are having a major re architecture. There is a point which may be a little persnickety but I can't see a standard one way or another.

When you are using real words in a URL with a / as a separator should you use a singular or a plural of the type. So

/user/fred

vs

/users/fred

SO seems to use "questions", "users", etc. but I was wondering if there is any authoritative advice either way.

PS. I couldn't work out if this belonged on SO SU or SF. Please feel free to move if you can work out which bucket it should go in.

link|improve this question

feedback

5 Answers

up vote 4 down vote accepted

I've always heard that it doesn't matter as long as you're internally consistent.

That being said, in *nix system architecture it's always singular. (e.g "user", "home", "mnt", etc (or should that be "etc"?)), so that might be a better default since it's already common?

link|improve this answer
That explains why I think that singular makes more sense. – Jeremy French Oct 12 '09 at 15:20
feedback

Either way, it's probably a good idea to set up a 301 redirect from the wrong one to the canonical version. That way, when someone types a link instead of copy-pasting it, they get a 301 instead of a 404.

Personally, I'd have /users/ as the page with a list of users on (if there is one) and /user/fred/ as fred's home page. But that's messy to make work, especially if you want to use 301 redirects, so on a real system, I'd pick one and stick to it.

link|improve this answer
+1 for 301 redirects, good idea! – Josh Oct 12 '09 at 18:02
feedback

I personally prefer the plural, it indicates that there is a collection of Users, in which you are looking for fred.

link|improve this answer
feedback

I prefer the singular /user/fred because it's more grammatically correct to the layman: you're looking at a user profile, for the user fred. However if /users/ shows all users, then /users/fred makes more sense.

Ultimately @Satanicpuppy is correct, what matters is that you're consistent.

link|improve this answer
feedback

I prefer plural. If you imagine your site not being dynamic, and you had to create the site just using folders and files that was served by apache. Then the folder would be plural. For example documents rather than document.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.