Creating a customized share link

Hello,

I am creating user profiles, and I want users to be able to share their profile. When they copy and paste their URL, it brings people to “current user” but how can I make the URL say, XYZ.com/usersname (LinkedIn.com/JaneDoe)?

Check out slugs: New Slug Feature for Customizable URLs

So I have a solution however it’s a little finicky. It involves using the URL Router plugin from Zeroqode (🌐 URL Router for Navigation - New Free Plugin from Zeroqode).

  1. On the 404 page of your app, add a router from the plug-in. Create a workflow that runs on page load that searches for a user with the username of the Router’s First Path and then navigates to a user profile page and sends the user.

  2. Place another router on the profile page. On page load create a workflow that uses the router to change the URL to “Website home URL/[user’s username]”

As I said before this method is a little finicky but it is a work around to the annoyances of slugs.

Hopefully this helps you out, it is a little confusing. :slight_smile:

Simply put, you can’t. Not even my professional grade Sudsy plug-in can do it. It’s a Bubble platform issue. Basically, the first “path parameter” must be an actual Bubble page. Here’s a similar post.

In addition to what’s mentioned there, I think you could also do something like the following…

mysite.com#username

-Steve

I’m no SEO expert, but I think that last thing you’d want to do is tell a search engine that the resource at your desired endpoint “could not be found”, which is exactly what the 404 response code does before the redirection occurs. :neutral_face:

That is a good point which I did not even think of. Alternately you create a profile page and use slugs like someone else previously mentioned, however your URL will look like this:
myapp.com/profile/username
Rather than this:
myapp.com/username

Exactly. The page name can be just a single character long, but it must be there as the first path parameter. You could use a hash symbol or a question mark to separate the domain from the dynamic resource, but not a slash.