How do you custom your site URLs

Hey there, I know there are few topics regarding the URL subject but yet none of them providing a clear solution.

So what is the best method fixing this scenario:

Current url:
https://mydomain.com/companies/name-1579154694530x362960020807614460

My goal:
https://mydomain.com/companies/company-name

I’m looking for a solution that will not effect the site-speed.

How do you solve this issue?

In my app I have a username field that users can edit themselves (after checking it doesn’t already exist). The database users primary key is set to username (rather than unique ID or email).

To display data, I send the user’s username to the URL (I use the Sudsy URL plugin), or display that user’s username in a group.

In order to display a users data in a group, I do a search for users with a constraint of that particular username. I hope that makes sense.

1 Like

I use the tactics as explained in this video

And combine it with the free plugin from zeroqode

And set things up like this in an app

3 Likes

Hey Boston, can I ask why do you need to use the Router on top of what’s explained in the video?
What feature does it add?

As far as I get it from the video, I should remove the datatype of the page and instead change the data type of a randomly selected group on the page to serve as a reference (for URL name). But then what do I need the Router for?
thanks

Make sure you don’t just randomly select. Get into a consistent habit of using the same group across pages. I set up a page with a group I call “group main” and have it fit the entire page. That group gets my data type so everything inside can reference it as a parent group.

In terms of the use of router, it really depends on what you are doing on the page. For example I use the router when I am doing a long form. Allowing a user to add a job posting over a five step process, I use the router plugin to change the “step number” in the router to provide both on page and browser back navigation.

Plus I pull the URL path to set the visibility of groups and a whole host of other conditionals associated with the current step the user is on.

I also use the router plugin on a page that has different groups of information for a listing that I don’t want to be viewed at the same time in a vertically long page. A retailer page that I have the retailers details like location, hours etc. is in one group, then another group has the retailers menu of products.

I don’t want the user to scroll down on the page to see the location info to find the product menu. For this I use the router plugin to change the URL path to hide/show/navigate the different groups. So my URL will change from www.myapp.com/retailer/details to 应用宝官网-全网最新最热手机应用游戏下载 when the user navigates using the on page buttons etc.

There are some drawbacks to the plugin though. One is that you can’t actually change the URL to go to a new page.

What I do extensively through my app for SEO is to use links to go from one page to another. Interlinking pages is important for SEO. I am able to send a user directly to 应用宝官网-全网最新最热手机应用游戏下载 for the product menu to be visible on page load and then use the router plugin to change to www.myapp.com/retailer/details on page or vise versa.

Another thing that you would want to get comfortable with is using links and the URL paths as a list feature. I used it recently to set up a page redirect system. I have a signup/login page as opposed to a popup. I set up the redirect so a user who is searching for an event and they have set up their filters and decide to sign up or login will be redirected back to the search page with filters still set after signup or login.

I also put together the redirect in the reset password email so after resetting a password they can still get back to the search results with filters set.

If you are just starting to focus on URLs I highly recommend playing around with all features, being parameters, path and paths as a list. I wish I had done it earlier as now I am using the parameters to store search filters.

For this I use the workflow event, navigate go to page. I then send a parameter to store the filters.

When I first got started focusing on ‘clean URLs’ I was quick to ignore all the other aspects to URLs and feel now that I should have spent a couple days to play around to understand them better. Because you don’t really need a clean URL for everything going on in the app.

4 Likes

Woo, Boston! This is super helpful! I really appreciate that you went for the extra mile on answering this. Many karma points for that. :pray:

1 Like

Do you know if there is a way to change a URL so it does not show the page name in the URL?

I want to change the users profile page URL from ‘mysite.com/profile/username’ to ‘mysite.com/username’. I tried doing making the profile page on the index page and getting data from URL to populate the page but then it show the word ‘index’ in the URL before the username.

Any suggestions or is this impossible?
Thanks.

P.s. I’m trying to make my users profile page work like twitter as (twitter.com/username)

P.s.s - This is the method I tried on the index page as well but it gives me a 404 page when adding the username to the end of the URL. This method works on a regular page but it adds the page name to the URL as ‘mysite.com/page/username

I don’t know if that is possible, but my gut tells me it is not possible

I think you’re right as that has been my experience so far trying to shorten the URL. I thought maybe someone had a work around.

this is awesome man, thanks… and does it work o native apps with the swipe back feature?

have you tried to do it on the index

Hey all,

Check out slugs

i dont know, sorry

did you manage to do this?