SEO optiimised slugs

Hi Guys,

I have a hotel booking website and I want to change my URL slugs to be more SEO friendly.

Currently, I have www.domain.com/cities , and then when you go in each city, you’ll land on a page like “/city-list/barcelona”, where the page is “city-list” and “barcelona” is a dynamically inserted from my table of cities, with RG hotels from Barcelona. I want to change it /hotels-barcelona, hotels-bali and so on. How would I do that?

Thanks.

Don’t use current page type of data since that makes it impossible. You need to use text in your data to send to form URL path lists.

I’ve done this a lot and have posts on the forum about it so searching with my handle and SEO should return some. Basic idea is that you need a page called cities (not the index since that will always end up with domain.com/index the moment you try to add additional path list items) so that you can structure the path list to be what you want, such as domain.com/cities/en/spain/barcelona/old-town so that you can structure them to follow the types of filters that a good hotel booking site would have, such as language, country, city, district and potentially more like apartment…this way you can optimize your SEO to have page titles, descriptions etc. that can read something like ‘Find the most compatible apartments in the Old Town district of Barcelona Spain’.

1 Like

Hi Boston,

I’m sorry but I’m even more confused now.

So /cities is not the index; it’s a page I created. And then from that page if you hit a picture or link you will go to a page called city-list/barcelona. City-list is a page again and the content of that page is a fitered result based on the city selection from the previous page. Barcelona is a city from the data base. So it dynamically places the city after the city list depending of what city you’ve chosen in the previous step.

Should I transform my pages in SPAs and just use slugs+text? Is this what you’re telling me?

Is this one of the articles you mentioned? Slugs and URL path for better SEO - #3 by boston85719

Does this help?

That is a post talking about a plugin of mine I made to make the whole process easier for me after years of needing to work on such tasks for clients and the complexity of URL path list items when not always having a set, known number of path list items (ie: sometimes, city is missing but state available, or no location and only category, or sometimes city, state and category). There are various other posts where I talk about the use of URL path list items and arbitrary text in data to send.

No. What I am saying if you want the best SEO for a booking site that uses cities, states, countries, category types etc. to use URL path list items, do not use a page content type so that you can use arbitrary text in data to send for go to page action to form the URL path list based on selected values, like the city, country and category type.

I wouldn’t do that myself for trying to optimize SEO for a booking site, but if you are following that approach, it should work fine if all you expect to ever do is SEO for the city.

As I mentioned, you need a page with the name of the first path item in path list, in this case hotels would be page name, then for optimized SEO use a / to separate in the URL path list the city name so you have hotels/barcelona…but if you are building a booking site with more than just hotels, like maybe apartments, or maybe activities, you can use a page name like book so you can have URLs like book/apartments/barcelona or book/activities/surfing/bali and any number of combination with the types key words use in searches for such things based on location and categories.

1 Like

Cheers.

How would I actually do this? You’re a bit vague :slight_smile: Maybe some screenshots would help? cheers

a / to separate in the URL path list the city name so you have hotels/barcelona…

Use go to page action. For data to send put text in form you want it to be like hotels/barcelona…it’s just text

Thanks. I’m trying to do this but I do have to send data for that cell in the repeating group so it loads the hotels from the right city for example?

So how can I put text if I need to send data?

Set up so don’t need to send data by not using a page content type.

thanks, but then how does the next page know what to load if it doesn’t receive anything!? My next page is a city page with all the hotels in that city.

And 2. When I close the window after I created my dynamic aribitrary text, I get the arbitrary text in red like an error

It receives the url path, then you set up to extract from path the items for your search

Because the page likely has a content type, which again, you can not do if sending text.

It may ultimately be easier for you to not strive for optimal SEO abilities and just get something decent and use an approach you are comfortable with if URL paths are complicating things for you.

1 Like

Thanks a lot mate! I managed to implement the “text” url like /<>/<> dynamically, but now how do I read the path to serve the right city?

I am doing a search based on path but doesn’t seem to work. How do I read the path url?

When you do the Get Data from URL use Path List, not path. Path is entire thing, from page name to end. Path list is also, but separated into items so bubble exposes path list item # operator to extract a specific item in path.

So page name is normally path list item #1, and each / will represent another path list item.

If domain is www.domain.com/booking/cities/barcelona then Barcelona is path list item #3

1 Like

Thanks a lot. Almost there! Now the Urls have <<country/<> dynamically with text as you suggested. This is what I have so far.

THis is the test link: https://domain.com/version-test/city-list/turkey/istanbul?debug_mode=true

City-list is the page with hotel results for the city.

I tried to pull the city list for the results from the url as per below…but it doesn’t work. I tried with #3,4,5

And by the way, how can I remove that city-list page from the URL? that is basically the page which show all hotels in istanbul or the city read from the URL.I would like a clean URl without that like https://domain.com/hotels/turkey/istanbul?debug_mode=true

Change name of page from city-list to hotels in your app

In regards to your search I don’t know what’s wrong, could be many things. I suggest first start by testing you’re extracting correct url path list item and see what the value is

1 Like

will give it a try. is the get data from page url expression correct? How would I test it? The debugger doesn’t show anything/ Thanks @boston85719

@boston85719 has the right idea here, but I have to mention, I recently did something very similar and the sudsy plugin helps a lot with urls/paths/params, check it out.