Magento 1.9 – Force Only Category URL

categorymagento-1.9url

Currently my Magento store (ce-1.9.0) has all its products in parent folders. For each product it will have 2 urls:

  1. From the Homepage = mysite.com/product-page
  2. From the Category Page = mysite.com/category/product-page

My problem is I need to only have the category url and not the URL straight from the homepage.

I know I can do the opposite (don't have category version, only homepage) by setting the Use Categories Path for Product URLs option to No in the admin system but there is no way of doing what i want.

I came across this link when searching the Q&A's but the link it points to is no longer valid and it looks like it was a previous magento version (1.5) not for the one i am using – ce-1.9.0

Best Answer

First, realize two things:

  • Google cares about URLs
  • Users don't care about URLs

So if you're trying to cater to the first, and not the second, then we have two options:

  • Enabling canonical URLs for Categories

OR

  • Disabling the category path URLs setting.

Here's how to do both:

Enable canonical URLs

In System > Config > Catalog > SEO enable this setting:

enter image description here

Disable category path in URLs:

enter image description here

Related Topic