Whenever I create a new product, Magento automatically creates unnecessary URL rewrites that include each category and subcategory combination, that use the categories' URL keys in the product path. For example, for a product product-name with the categories:

category category > subcategory category > subcategory > third

...Magento will automatically create URL rewrites with the following request paths:

/category/product-name /category/subcategory/product-name /category/subcategory/third/product-name

...as well as also creating the in-use URL rewrite with request path:


My question is, even though I have the setting Use Categories Path for Product URLs set to No in:

System > Configuration > Catalog > Search Engine Optimizations

...how do I stop these additional URL rewrites from being created automatically?

Now, again, I realize that the site isn't linking to these additional paths anywhere on the site, but if for some reason a search engine picked up:


...this would load! I'm nervous this will result in duplicate content being indexed by search engines. Since the Use Categories Path for Product URLs setting is set to No, and all links to the product on the site are pointing to:


...I want to stop Magento from creating these unnecessary URL rewrites automatically.

For reference, I tried truncating the core_url_rewrite table to zero (basically emptying it out) and reindexing the Catalog URL Rewrites in System > Index Management. This still results in Magento automatically creating these unnecessary URL rewrites.

Also, for reference, I am using Magento Community 1.9.1.

Please advise! Your help is much appreciated.

1 Answer 1


I was actually looking for a similar solution as I have more than 1.5 millions URL rewrites created for 35 000+ products. All of this caused by categories, subcategories but also many store views.

I just found a FREE extension that seems to work on every Magento version (confirmed up to 1.8.1 from the comments)

I'm using the latest 1.9.1 so I will have to test it out but this extension is preventing creation of all subcategories URLs, invisible and disabled products for which Magento also creates URL rewrites for.

Correction: From the comments on Magento Connect it works fine on version 1.9.1.

Please follow this link, all the details are explained in details:


EDIT: Github Download: https://github.com/molotovbliss/DnD_Magento_Patch_Index_URL

  • I have this extension and it works alright, but I noticed today that if I create a new category and put products in it it still creates the rewrites for the products, but if I truncate the rewrite table and rebuild all rewrites it doesn't. Is this something anyone else has experienced?
    – Mageician
    Commented Jun 18, 2019 at 21:52
  • Github download: github.com/molotovbliss/DnD_Magento_Patch_Index_URL
    – HenryHayes
    Commented Sep 12, 2023 at 13:07

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.