Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+7 votes
in Q2A Core by
edited by

I feel like the current URL system for user profiles doesn't work very well.

Currently the URLs are like this: /qa/user/Username
I think they should be: /qa/user/123/username

There are several disadvantages to the current system:

  • The URL contains special characters. This is OK for the most part but often URLs end up with encoded characters like %23%76%23%78 which looks bad.
  • That makes it hard to type out a URL as well (minor issue).
  • The profiles are case-insensitive because of the string lookup in the database. So /user/Scott and /user/scott goes to the same page. This causes duplicate content, and in fact the username displayed is the one in the URL, not the actual username. (Could be solved by rel=canonical and displaying the proper username.)
  • When users change their usernames, the old page becomes completely inaccessible. This causes TONS of 404 errors in Google Webmaster Tools and it's bad for SEO to have such a high turnover of 404s and new pages. (Another side issue, which isn't Q2A's fault, is that I've had some people trolling on chat then changing their username. That makes it hard to find and ban them.)

We should switch to a number system just like the questions. The "slug" in the URL can be like the questions, generated from the user's name and made lowercase with dashes. So something like ♫My Cool UsErNaMe¶ would be converted to /user/123/my-cool-username.

That solves the first 3 problems. The user can be looked up via their ID and the URL doesn't look like crap. If they changed their username to Even COOLER Username♥ then the URL would now be /user/123/even-cooler-username. If you go to the old URL, /user/123/my-cool-username then they are looked up via the ID and it displays the profile for "Even Cooler Username". We can have a canonical tag on the page to show the true URL, which solves any duplicate content issues.

Hope that all makes sense. Let me know what you think and if there are any issues I've overlooked :)

we discussed that a bit already, as far as i remember. again +1

1 Answer

+2 votes
I completely agree, even though my own website doesn't suffer from any difficulties using the current system. Maybe special characters in usernames should be an option?
I don't mind users having special characters in their usernames, but having that in the URL looks bad, and doesn't solve the biggest issue which is all the 404 errors.