How to give user custom url for your site

I created a member log in page with their own custom profile, but having troubles with giving them a option to create their own custom username such as www.yoursitename.com/username, i have a form where they can type in up to 25 characters for their page username. But how to apply it to their custom profile and web address to type it in and goes directly to their profile. I have a database all set up as i mentioned i also have a custom profile, its just that one thing i can’t figure out. Any help is appreciated.

Hi,

Basically you should be able to do so by using both Custom User Form and Dynamic Pages features working against the same collection and having the “username” field as part of the Dynamic Pages URL

For more information on Custom Form
https://www.wix.com/code/home/tutorials-custom-form

For more information on Dynamic Pages
https://www.wix.com/code/home/tutorials-dynamic-pages

Let me know if you need more details

Thanks
Adi

Hello Adi,

I went to settings and changed the url of the dynamic profile page to /username it went through but with the code i have set up when i click on profile it isn’t connected to their profile. the code for this button is

export function button4_onclick() {
wixLocation.to(/Profile/${wixUsers.currentUser.id});
}

any help or change in this code have to be made? so when i click on profile it goes to the dynamic page with the url set to username

Could you please share a link to your Site Editor so we could take a look?

Hello Adi,

Yes, this is the link that will take you to my site editor. .
If you can help me that would be awesome. :slight_smile:

Hi Austin,

i have logged in to your site and created my account. my profile now exists on https://photobeyond.wixsite.com/testing/profile/3acbd9ad-2fa6-482c-8a62-8fd682a6b5e8

in your live db you can see my record here below, i also added the _id field which is hidden by default which is also used as the profile db key and in your dynamic page url.


what you need to do, when creating the db record is providing your own _id as the username or email, rather than using wix current user id
i am not sure how you can also collect a unique user name during the wix members login or if it is currently supported at all, you will probably need to contact wix support for additional info

good luck!
Shlomi

I would be really appreciative if I could get help with this as well.

Hi Mike.
Can you please elaborate what are you trying to achieve?

Regards,
Genry.

sorry i did not notice that you had replied. I will pay more attention. I am also trying to create a user login page that will allow me to assign custom urls. I need them to be [wix.com/Profile/GamerTag]
The “GamerTag” field being one of the user inputs they fill out.

Hi Mike.

Please checkout the routers feature, it might be what you are looking for.

Regards,
Genry.

Hi,

Further to the suggestion by genry above, i highly recommend you further look into what me and Adi have suggested above.
Create a dynamic page based on the user collection and modify the dynamic page url to be based on a unique id which identifys your users

Shlomi