Search code examples
uniqueuser-profile

What is the best practice to create a unique url for every user profile


In my every application i want to create a unique url for users profile as http://app.com/username .

I have the name of user is : 'Vijay Kumbhar' i can create http://app.com/vijay_kumbhar, but if there is another user registers with the same name then what will be better way of creating url for that user. one way is to add vijay_kumbhar_1, but i dont think this is the proper way of creating a unique url

Can you please suggest me the better way of doing this.


Solution

  • Keeping in the User experience in consideration, firstly provide the user with unique id, through which you can identify the User easily. After that you can allow the User to opt for any new User Name (screen name), but there should be a check again that the user name has to be unique again. Depends upon your requirement. Do keep us posted what way you opted at last.