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:
/product-name
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:
http://example.com/category/subcategory/third/product-name
...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:
http://example.com/product-name
...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.