I'm working on an e-commerce website and I'm faced with this issue: I need to place a "Back to category" button on my product pages but some of these products are linked to 2 or 3 different categories. I don't know if I just have to choose the most relevant category, or if I should create a button that just takes the user back to the previous page.

For example: In the first case, if a user comes from Category 1 and the button is linked to Category 2, they will be taken to Category 2.

In the second case, the problem is that if a user comes from an external page, they would be carried out of the website.

What is the best solution for this situation?

2 Answers 2


Unless the user follows a specific route to the product detail page, it doesn't matter which category path you present them, as long as the path makes logical sense.

This scenario would occur in two cases:

  1. If the user arrives from an external page (as you've mentioned above)
  2. If the user searches for a product on your website and clicks on the product

The ideal solution to cater to this scenario would be to map the precedence of each category path with respect to the product and showcase that category path in either of the above cases. Some of the factors influencing the precedence of categories could be, the important of the respective category to your business, the number of conversions each of the categories tends to bring, the category path that users frequently tend to take to reach that specific product etc.

On the other hand, if the user has followed a certain path to the current product detail page, it only makes sense to present the path they have traversed to reach the current page. This can easily be achieved using breadcrumbs.

  • Thank's a lot for your answer, I'll study it ! Commented Oct 26, 2021 at 12:43

You could allow the users to navigate to ANY of these categories instead of having only one button.

If the users are looking at a product, let's say it's a pair of shoes, you could list the categories this pair of shoes belongs to, for instance, they could be "leather", "boots", "laced", etc. And you could allow the users to click on any of them. Clicking on these categories will open up the catalogue page with the listing filtered by the category they clicked on.

You could display them as "pills" perhaps.

This will allow for a much more flexible solution that would accommodate one or more categories to be listed and will also leave people agency to click on the category they deem to be the most relevant for them at that moment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.