# Individual URL's for users

**URL:** <https://forum.bubble.io/t/individual-urls-for-users/13167>\
**Category:** Need help\
**Created:** [May 5, 2017, 7:52pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167 "2017-05-05T19:52:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jacob/32/67998_2.png) [@jacob](https://forum.bubble.io/u/jacob)\
**Post date:** [May 5, 2017, 7:52pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/1 "2017-05-05T19:52:22Z")

</div>

Hello Bubble

i’m creating a platform for my website. The users can create a profil and so on. Is it possible to make every user-profil have their own individual URL, so that people can share their profil for others to view.

//Jacob 🙂

---

<div class="post-metadata">

**Author:** ![codurly](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/codurly/32/11928_2.png) [@codurly](https://forum.bubble.io/u/codurly)\
**Post date:** [May 5, 2017, 10:06pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/2 "2017-05-05T22:06:05Z")

</div>

A good tactic is using their unique ID trimmed down to about 6-7 length and putting it in the URL data. When the page is loaded it shows information based on what is in the URL.

---

<div class="post-metadata">

**Author:** ![romanmg](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/romanmg/32/237672_2.png) [@romanmg](https://forum.bubble.io/u/romanmg)\
**Post date:** [May 5, 2017, 11:31pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/3 "2017-05-05T23:31:57Z")

</div>

Hi @jacob,

There is actually a way to extract the path from a URL, which lets you go about creating this kind of thing in a few different ways.

You can store a user’s unique path string in a text field under the User type and then append that as a path to the profile page url. For example “[myapp.com/profile/john-henry](http://myapp.com/profile/john-henry)” or “[myapp.com/profile/naturalfoodstore](http://myapp.com/profile/naturalfoodstore)”. What you’d be storing is just “john-henry” or “naturalfoodstore”.

So anytime you navigate to the profile page and want to specify a user, you’d use an external link action (or link element) to go to “[http://myapp.com/profile/](http://myapp.com/profile/)[current user’s path]” … or [current cell’s user’s path] if triggered from a repeating group.

Then, on the profile page, since you’re using the path to identify the user, one way to make the page dynamic is to put everything in the page inside a group. Set the group’s type to User and the source to “Search for Users: first item, constraint: path = get path from page URL”. Then everything within would just be “Parent groups [field]”

“Get data from page URL” has 2 types available - parameter and path. Choose Path.

Search the forum for more on this because this is a great way to create “pretty” custom URLs.

* * *

Gaby | [Coaching Bubble](https://coachingbubble.com)

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jacob/32/67998_2.png) [@jacob](https://forum.bubble.io/u/jacob)\
**Post date:** [May 8, 2017, 1:16pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/4 "2017-05-08T13:16:54Z")

</div>

Can you make a description for me on how to do this 😉

//Jacob

---

<div class="post-metadata">

**Author:** ![seanhoots](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/seanhoots/32/12224_2.png) [@seanhoots](https://forum.bubble.io/u/seanhoots)\
**Post date:** [May 8, 2017, 3:48pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/5 "2017-05-08T15:48:38Z")

</div>

@jacob i’m not sure what more description you need as @romanmg gave a very detailed description what to do.  
Anyway i took the time to create a demo for you. Reading @romanmg’s post and looking at my editor should make it very clear but feel free to ask if you still dont get it.  
To get the path from page URL i use “find & replace” with the regex /[^/]\*$  
This regex means, match any string after the last “/”. Since our profile page url is of the form [yoursite.com/profile/username](http://yoursite.com/profile/username), doing the find & replace with the above regex should return “username”  
Demo view: [https://userprofiletest.bubbleapps.io/version-test/users](https://userprofiletest.bubbleapps.io/version-test/users)  
Editor: [https://bubble.io/page?type=page&name=users&id=userprofiletest&tab=tabs-1](https://bubble.io/page?type=page&name=users&id=userprofiletest&tab=tabs-1)  
The editor has two pages, user and profile.

Hope this helps. Happy bubbling 😄

EDIT: Please note that my implementation assume unique usernames else it will return the first one that matches.In your implementation you can use any field you want as long as they’re unique.

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [May 8, 2017, 6:13pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/6 "2017-05-08T18:13:11Z")

</div>

Just interested in why you are using a Regex ?

---

<div class="post-metadata">

**Author:** ![seanhoots](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/seanhoots/32/12224_2.png) [@seanhoots](https://forum.bubble.io/u/seanhoots)\
**Post date:** [May 8, 2017, 6:23pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/7 "2017-05-08T18:23:01Z")

</div>

Hi @NigelG, funny enough i didn’t give that design decision much thought. I had previously done something similar where i needed to use regex to extract some information from the url to be able to use it as a filter for some data source. So i just went with that idea here.

But giving it a second thought now, is there a simpler way to extract data which is not necessarily a parameter from url without using regex?  
Here we want to be able to access a user’s profile page directly e.g. i should be able to enter [myapp.com/profile/username](http://myapp.com/profile/username). So it’s not like i’m getting data (e.g. username) from another page as a url parameter.  
I’m still a beginner so happy to hear your thoughts.

---

<div class="post-metadata">

**Author:** ![seanhoots](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/seanhoots/32/12224_2.png) [@seanhoots](https://forum.bubble.io/u/seanhoots)\
**Post date:** [May 8, 2017, 6:37pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/8 "2017-05-08T18:37:43Z")

</div>

HI @NigelG,  
Also as you can see from the snapshot below (the users list page), i didnt send any data to the profile page. I used External URL and i customized my destination url to have the clean url.  
So on the profile page i didn’t have any url parameter to simply use to pull the user’s data.  
What’s the best and cleanest way to do this without involving regex for the sake of users not familiar with regex.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/3/3ea89515e5d2e016b88a1a60e0cbd59c439e24bd.png)

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [May 8, 2017, 7:09pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/9 "2017-05-08T19:09:47Z")

</div>

You can just use “path” I think ?

 ![](https://us1.discourse-cdn.com/bubble/original/2X/c/c6db61f55a1f5d360c60a30574d1205e2e5a5077.png)

But was interested in what the use case was that meant you needed a regex.

---

<div class="post-metadata">

**Author:** ![seanhoots](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/seanhoots/32/12224_2.png) [@seanhoots](https://forum.bubble.io/u/seanhoots)\
**Post date:** [May 8, 2017, 7:52pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/10 "2017-05-08T19:52:33Z")

</div>

Aha i see. I didn’t know i could simply just use path. Actually i used path but i thought the path returns the the portion of the url after the Website Home Url that is why i was using the regex to get the last string after “/”.  
I just read the documentation and you’re right, i could just have ended it at stating path. This is what the documentation says  
“If you select path, you can retrieve ‘hello’ in the URL ‘[yourdomain.com/yourpage/hello](http://yourdomain.com/yourpage/hello)’.”

Thanks @NigelG for this knowledge.

With regards to the use case for using regex. In a previous application i had a custom clean url e.g. [myapp.com/some\_id/another\_id](http://myapp.com/some_id/another_id). And i needed to retrieve both “some\_id” and “another\_id” from the Url.  
So i did “This URL : find & replace : my\_regex”.

@jacob i’ve updated my demo to simply use path without any regex as Nigel correctly suggested.

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [May 8, 2017, 8:04pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/11 "2017-05-08T20:04:27Z")

</div>

Ah, gotcha, that makes sense now 🙂

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jacob/32/67998_2.png) [@jacob](https://forum.bubble.io/u/jacob)\
**Post date:** [May 15, 2017, 10:00am UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/12 "2017-05-15T10:00:04Z")

</div>

i can’t figure out how to do it this way…

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jacob/32/67998_2.png) [@jacob](https://forum.bubble.io/u/jacob)\
**Post date:** [May 19, 2017, 9:32am UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/13 "2017-05-19T09:32:59Z")

</div>

I dont know how to use the regex…

---

<div class="post-metadata">

**Author:** ![danp1995mail](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/danp1995mail/32/12521_2.png) [@danp1995mail](https://forum.bubble.io/u/danp1995mail)\
**Post date:** [May 19, 2017, 10:02am UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/14 "2017-05-19T10:02:36Z")

</div>

I’ve successfully implemented individual, custom URLs for users:

I have a Data Type called “profileid”,which will be the string of characters (path) at the end of the URL for each user. Each User should also have a field called ‘profileid’, which will consist of their profileid.

![](https://us1.discourse-cdn.com/bubble/original/2X/c/ca05f3236dcbb91974031af2ce9086efeab1e177.png)

When the user signs up (or later, when they edit their account), have them specify their ‘profileid’. When it gets saved, do a search for profileids to make sure there isn’t already one that exists the same. If its unique, create a profileid and then make the User’s profileid = the one you just created.

![](https://us1.discourse-cdn.com/bubble/original/2X/3/345a70881a37adc0e8e3203903ee94ab0d833a96.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/1/1c278f57a486be84de77377e6711b55b05545e94.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/7/756506d5ba2add4ecdc6362c21925687e452b827.png)

Anything that links to the Profile page should ‘Open external website’ and goto ‘This website’s home URL’+ sub page (without a space)/Current User’s profileid:

![](https://us1.discourse-cdn.com/bubble/original/2X/2/2c3221ea2a58b7768f33cc1532c6545b1af11210.png)

Then on the relevant page (in my case, the Therapist Profile page), make its type ‘User’ and its data source ‘Do a search for Users’, with profileids equal to the “path” from the URL.

![](https://us1.discourse-cdn.com/bubble/original/2X/9/9523c8b3801217840d1134f22a996d545b7958cd.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/1/1f2e66fb8056e37cad3f2702b9865fa795d91ce1.png)

Hope this helps! Let me know if you have any questions. It works really well and is pretty easy to set up.

EDIT: Ah man, might as well show you an example of it working on my still in construction site: [https://calmly.io/version-test/therapists/simonhill](https://calmly.io/version-test/therapists/simonhill)

So the fake user, Simon Hill, when signing up made his profileid “simonhill”.

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jacob/32/67998_2.png) [@jacob](https://forum.bubble.io/u/jacob)\
**Post date:** [May 19, 2017, 10:44am UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/15 "2017-05-19T10:44:12Z")

</div>

Can the information on the relevant page depend on the URL so you don’t have to define a specific profil ID when “open an external website”? @danp1995mail

---

<div class="post-metadata">

**Author:** ![danp1995mail](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/danp1995mail/32/12521_2.png) [@danp1995mail](https://forum.bubble.io/u/danp1995mail)\
**Post date:** [May 19, 2017, 10:57am UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/16 "2017-05-19T10:57:19Z")

</div>

You could use a dynamic input where the specific ‘profileid’ is in the external website URL. It could retrieve that path from anywhere, really - be it the existing page’s URL, the current page’s user’s profileid or some other variable.

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jacob/32/67998_2.png) [@jacob](https://forum.bubble.io/u/jacob)\
**Post date:** [May 19, 2017, 10:58am UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/17 "2017-05-19T10:58:33Z")

</div>

can you show me in screenshots how to do this ?

---

<div class="post-metadata">

**Author:** ![danp1995mail](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/danp1995mail/32/12521_2.png) [@danp1995mail](https://forum.bubble.io/u/danp1995mail)\
**Post date:** [May 19, 2017, 11:02am UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/18 "2017-05-19T11:02:09Z")

</div>

Can I clarify what it is you’re after:

1/ Do you want the Page to derive its data from somewhere other than the path of the URL?

2/ Do you want the profileID to be determined by the Current User/Parent Group User/Current Page user?

I’m a bit lost 🙂

---

<div class="post-metadata">

**Author:** ![jacob](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jacob/32/67998_2.png) [@jacob](https://forum.bubble.io/u/jacob)\
**Post date:** [May 19, 2017, 11:08am UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/19 "2017-05-19T11:08:39Z")

</div>

1/ no  
2/ current user

hope it helps understand

---

<div class="post-metadata">

**Author:** ![danp1995mail](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/danp1995mail/32/12521_2.png) [@danp1995mail](https://forum.bubble.io/u/danp1995mail)\
**Post date:** [May 19, 2017, 2:35pm UTC](https://forum.bubble.io/t/individual-urls-for-users/13167/20 "2017-05-19T14:35:46Z")

</div>

The workflow I shared above should load whatever profileID is saved to the Current User.

![](https://us1.discourse-cdn.com/bubble/original/2X/4/4a14fd33dd1cfc2ca3f95db7173ecf6b5ede052d.png)

Every user should have an ID attached to them on signup:

![](https://us1.discourse-cdn.com/bubble/original/2X/7/7d2ee818621a90afea1bf61ef2284c57898ee856.png)

[Next page](https://forum.bubble.io/t/individual-urls-for-users/13167.md?page=2)
