Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Udev's avatar
Level 2

url and SEO

Would using products?category=category_slug instead of products/{category} affect SEO? Which would be better for SEO? I'm am trying to avoid the latter as it would need custom routes for the crud as oppossed to the default /products -get -post and /products/{product} -get -post -delete.

0 likes
6 replies
gych's avatar

Using a descriptive urls like products/{category} is better for SEO.

1 like
Udev's avatar
Level 2

@gych What if an admin can add sub categories dynamically such that you get a tree structure like:

mens > shoes > sneakers.

In this case I can use a route like /products/{category}.../{nth category}. However, since the category is added dynamicly it is more practicall to just have /products/{category}. How does this affect the seo?

gych's avatar

@Udev Its better to use products/mens/shoes/sneakers because those categories are relevant to the page which is good for SEO.

Also when you have a main category for women that uses the same sub categories this will cause issues if you don't add the main category + subcategories to the url products/women/shoes/sneakers

1 like
Udev's avatar
Level 2

Assuming the categories can have multiple levels set dynamically by the user, I don't think it is practical to define routes for this, unless I limit the admin to something like 3 levels of sub-categories.

Also if I have same name sub-categories I can generate a numbered slug, i.e.,

1.mens > shoes > sneakers products/sneakers

2.womens > shoes > sneakers products/sneakers-1

Some sites have something like products/mens-shoes-sneakers/ while sites like amazon don't have the category as a parameter but instead in the query.

Also noticed that amazon has a "breadcrumb" component on the page listing the current directory tree. Can this help with SEO instead of having categories as a parameter in the url.

gych's avatar
gych
Best Answer
Level 29

@Udev Yes I can imagine that it would become difficult to use descriptive URL's if the amount of subcategories is not known upfront. Therefore you can still go with a query url if descriptive url's will be to hard to maintain.

If you make sure that your page has good content, keywords, product description, meta tags, html structure, breadcrumbs, alt tags, structured data schema, and page speed, etc. your page will propably still have a good score.

1 like
Estinvosh's avatar

Using a clean path like products/category-shoes usually gives search engines clearer signals than query strings, but Laravel can still keep your CRUD routes tidy with route model binding or a small grouping tweak. I’ve also been leaning on a Quora SEO strategy to strengthen category pages, since it helps search engines connect the dots between structured URLs and user intent.

Please or to participate in this conversation.