# Is it possible to setup the URLs for profiles as website.com/username rather than website.com/profile/username for example

**URL:** <https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053>\
**Category:** Questions\
**Created:** [January 25, 2022, 9:47am UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053 "2022-01-25T09:47:03Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericdf94](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@ericdf94](https://forum.bubble.io/u/ericdf94)\
**Post date:** [January 25, 2022, 9:47am UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/1 "2022-01-25T09:47:03Z")

</div>

Im new to Bubble so sorry if I am missing anything but in order to make a user profile page it seems like you need to make a page as a template of sorts and then forward the users data to that page. That then makes the URL WebsiteName/ProfilePage/Username. There doesn’t seem to be any way to forward the data to index or to remove the ProfilePage part from the URL. Is there any workarounds or am I best just doing something like naming the page “p” to keep it short?

---

<div class="post-metadata">

**Author:** ![williamtisdale](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/williamtisdale/32/113723_2.png) [@williamtisdale](https://forum.bubble.io/u/williamtisdale)\
**Post date:** [January 25, 2022, 6:55pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/2 "2022-01-25T18:55:28Z")

</div>

It seems what you are referencing is to have it to where users can visit other users profile pages? Like if user1 was logged in and went to website/profilepage/user2 then they would see that user’s info? The way I think to acheive this best would be to set up a generic profile page that gets its data source for the user from the url. Then when a logged in user clicks on another users image to go to their page you can use the action “Go to page” then select the generic profile page and check the box to pass parameters and pass the user whose image was clicked unique identifier as a parameter.

---

<div class="post-metadata">

**Author:** ![ericdf94](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@ericdf94](https://forum.bubble.io/u/ericdf94)\
**Post date:** [January 25, 2022, 7:32pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/3 "2022-01-25T19:32:48Z")

</div>

Yea I’ve got that part figured out but it makes it so that the name of the generic page is added to the URL.

I’m thinking of something like Twitter, the URLS and just [twitter.com/username](http://twitter.com/username) not [twitter.com/profile/username](http://twitter.com/profile/username)

Is there any way to do?

---

<div class="post-metadata">

**Author:** ![williamtisdale](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/williamtisdale/32/113723_2.png) [@williamtisdale](https://forum.bubble.io/u/williamtisdale)\
**Post date:** [January 25, 2022, 7:45pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/4 "2022-01-25T19:45:55Z")

</div>

Look up window.history.pushState. You can make the url say anything you want after you grab the url parameter so the user sees something more legible.

---

<div class="post-metadata">

**Author:** ![ericdf94](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@ericdf94](https://forum.bubble.io/u/ericdf94)\
**Post date:** [January 25, 2022, 8:58pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/5 "2022-01-25T20:58:23Z")

</div>

I found your post here about that [How to restart current page parameters? (Keys)](http://forum.bubble.io/t/how-to-restart-current-page-parameters-keys/186064)

and it might be what I am looking for. However it seems like it will adjust a page’s URL not change it. So if someone goes to [website.com/profile/username](http://website.com/profile/username) I could have it remove the profile part and just show [website.com/username](http://website.com/username)

but if someone just goes directly to [website.com/username](http://website.com/username) via a link or typing it in the address bar, would it still work?

---

<div class="post-metadata">

**Author:** ![williamtisdale](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/williamtisdale/32/113723_2.png) [@williamtisdale](https://forum.bubble.io/u/williamtisdale)\
**Post date:** [January 25, 2022, 9:09pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/6 "2022-01-25T21:09:32Z")

</div>

Oh I see. No in that case it would not work.

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [January 25, 2022, 9:23pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/7 "2022-01-25T21:23:51Z")

</div>

> [@ericdf94](#):
>
> Is there any workarounds

No, unfortunately. It’s just the way Bubble works. The first path parameter MUST be a Bubble page.

> [@ericdf94](#):
>
> Is there any workarounds or am I best just doing something like naming the page “p” to keep it short?

I think that’s your only option.

Tons of posts on the forum about this, BTW. Just search for “url router” and/or “sudsy page”.

-Steve

---

<div class="post-metadata">

**Author:** ![equibodyapp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/equibodyapp/32/159574_2.png) [@equibodyapp](https://forum.bubble.io/u/equibodyapp)\
**Post date:** [January 25, 2022, 9:27pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/8 "2022-01-25T21:27:26Z")

</div>

@ericdf94 You can create the profile ‘page’ on your index page - just have conditions for when to show the group based on what it finds in the URL and also pull that data to tell the elements what record to show.

Use ‘get data from URL’ and then use path parameters

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [January 25, 2022, 9:33pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/9 "2022-01-25T21:33:01Z")

</div>

> [@equibodyapp](#):
>
> You can create the profile ‘page’ on your index page

Hi @equibodyapp,

I might be misunderstanding, but in my experience, Bubble interprets the first path param as a Bubble page and attempts to load it, which will just lead to a 404. Maybe something has changed with the platform though. Do you have a working example?

-Steve

---

<div class="post-metadata">

**Author:** ![equibodyapp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/equibodyapp/32/159574_2.png) [@equibodyapp](https://forum.bubble.io/u/equibodyapp)\
**Post date:** [January 25, 2022, 9:35pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/10 "2022-01-25T21:35:45Z")

</div>

Oh it could very well do that - I haven’t tried it on the first path

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [January 25, 2022, 9:44pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/11 "2022-01-25T21:44:42Z")

</div>

> [@williamtisdale](#):
>
> Look up window.history.pushState. You can make the url say anything you want after you grab the url parameter so the user sees something more legible.

I believe this can be done in pure Bubble - no JS needed. I often pass data this way from reusable elements (even if they’re nested within a repeating group) in lieu of using custom states.

-Steve

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [January 25, 2022, 10:02pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/12 "2022-01-25T22:02:38Z")

</div>

Hi guys 👋

Yes, you can have [www.yoursite.com/username](http://www.yoursite.com/username).

I’ve done this a few times for my projects. It’s completely doable just with Bubble. I’m going home right now and when I get there I’ll post the solution.

@ericdf94 @williamtisdale @sudsy @equibodyapp

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [January 25, 2022, 10:47pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/13 "2022-01-25T22:47:37Z")

</div>

> [@rpetribu](#):
>
> I’ve done this a few times for my projects. It’s completely doable just with Bubble.

Wow! Looking forward to learning how.

😀

### EDIT

Hopefully, it doesn’t involve a redirect, though. That’s been mentioned on the forums and would not a workable solution for my needs.

-Steve

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [January 25, 2022, 10:51pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/14 "2022-01-25T22:51:00Z")

</div>

Ok… so…

First of all, it is important (and obvious) that you will need a “username” field in your user’s database in order to be able to relate the user according to their “username”. So when you `Search for a user where username = crazy_orange`, you will be able to get all his information…

That’s been said, let’s pick as an example the URL “[www.mysite.com/crazy\_orange](http://www.mysite.com/crazy_orange)”

As @sudsy already said, bubble will interpret the “crazy\_orange” path as a page and will try to load it. Bubble will fail and automatically redirect the user to the 404 page.

⭐ **And here is the trick.** ⭐

Note that when the 404 page loads, the URL will still be “[www.mysite.com/crazy\_orange](http://www.mysite.com/crazy_orange)”

**So everything you have to do is to create the profile page INSIDE the 404 page.**

👉 Ok, but how can I access the parameter “crazy\_orange” in order to be able to pull information from this user?

Easy. **You ALREADY have it in your URL** ([www.mysite.com/crazy\_orange](http://www.mysite.com/crazy_orange)). You just have to use the action “Find and Replace” to get rid of your **Website home URL** , leaving just the “crazy\_orange”. You can do something like this:

![image](https://us1.discourse-cdn.com/bubble/original/3X/1/6/16ced7a46a265d8cb476a4725ab44e7b923f80c6.png)

![image](https://us1.discourse-cdn.com/bubble/original/3X/b/b/bb864bb866e45dcedfc8618e2166d2c9d2305682.png)

Boom 💥. The result of this operation will be “ **crazy\_orange** ”. Now you can use it to `Search for User where username = crazy_orange`.

`If the :count of this Search is zero`, then you don’t have this username in your database (and also don’t have this page, remember that you are in the 404 page). So, in this case, just show an alert or some generic text informing that the user is lost and bla bla bla…

`If the :count of this Search is > 0`, then you know that the user exists. In this case, show the profile.

Hope it help you guys!

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [January 25, 2022, 10:56pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/15 "2022-01-25T22:56:13Z")

</div>

> [@rpetribu](#):
>
> Bubble will fail and automatically redirect the user to the 404 page.

Thanks for taking the time to share, @rpetribu. Yeah, that’s been mentioned on the forums before, and unfortunately, it kills SEO. ☹

-Steve

### EDIT

If one’s sole concern is strictly what the visitor sees in the address bar, then I guess it might be an option, but there will also be a performance hit with the redirection.

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [January 25, 2022, 11:19pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/16 "2022-01-25T23:19:56Z")

</div>

Yeah, to be very clear about this (what @sudsy is saying), such pages would not be indexable, and would be crappy in other related ways (like, what’s the unfurling image going to be when shared?).

It’s much better to use the same lookup technique on a “real” page. A lot of discussion about this in the following old thread:

> [@Showing IP Address for individual User Pages](http://forum.bubble.io/t/showing-ip-address-for-individual-user-pages/37507):
>
> Hello, I’m considering an app where a user creates a public profile (avatar, user details, the whole Facebook-esque 9 yards). I want to show the user their account’s IP address so they could plug that into their own custom domain to redirect people to the profile. Ex: As a user, I own [www.bradfarley.com](http://www.bradfarley.com) (via Google domains, GoDaddy, etc). I want that domain to redirect to my profile on the app…www.bubbleapp.com/[user profile ID] Can I do this? How do I display the IP for the user (in their …

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [January 25, 2022, 11:34pm UTC](https://forum.bubble.io/t/is-it-possible-to-setup-the-urls-for-profiles-as-website-com-username-rather-than-website-com-profile-username-for-example/188053/17 "2022-01-25T23:34:51Z")

</div>

Yes yes… you are right! But this is the simplest way to do it. You barely feel the redirect! I use it and it really works well!

But yes… it will kill the SEO, but this is generally a sub-page (of a user of the app). It’s not a big deal.
