Forum Documentation Showcase Pricing Learn more

URL simplification | Has this been created on Bubble yet?

A while back I started a thread about SEO and Social media friendly URLs. Here is a link to that thread:

As you can see, this turned into a VERY complex solution, especially for those of us who already have complex pages built that contain at-least 200+ elements on them. And at the end, the solutions presented also had things about them that made them less desirable.

Has Bubble devised a simple way to remove the “unique id” from URLs yet? If not, is this at least being considered for future updates? I REALLY need this and I can only assume, many others are in the same boat.

1 Like

@Bubble @neerja

I got a solution to work using copilot’s browser plugin. Changes the URL to whatever you want, so I controlled the view with state internally and ran the browser plugin on a workflow to change the URL.

The tricker and more annoying bit was what happens if a user goes directly to said URL… I ended up putting complex ‘on load’ workflows in place… Ie., If my app.com/task/1234 is accessed, grab the URL, extract the 1234, search for task with Id 1234, set state of page to that task, etc.

It worked but wasn’t especially scalable.

1 Like

I’ve not actually tried the specific technique you referenced, but with Sudsy Page, the basic approach is as follows:

  • When the URL changes, your app is notified with an event and “handed” a list of path params (exposed in a state).
  • You respond to that event with a workflow that uses the path params to implement your desired logic.

In your case, it seems you’d want to use the 2nd path param (Anthony-Bigums in your example) to look up that user in the DB.

Of course, the onus is entirely on you to define and enforce your desired URL structure as well as whatever URL “slugs” you wish to use as path params (a username in your example).

1 Like

I haven’t been on this forum lately. Has anyone devised new, simplified solutions for this issue yet?

How would you envision it working - I mean, from a Bubble developer’s perspective?

The URL identifying each resource (user in your case) must be unique, so you’d just use the username as the unique identifier for each user.

A major update to Sudsy Page is currently awaiting marketplace approval, but you still have to devise and implement your desired URL structure. If ALL you need is something like…

  • https://mysite.com/users/username

…that should be pretty straightforward. In fact, most of the effort would be enforcing uniqueness of the user names on sign-up.

1 Like