I'm not a programmer. We have a site that uses simple products now - originally configurable. we have canonical links so https>site/product is how they're set.
Each category is a page of blocks that display the next level category items, then products at bottom level.
So urls are https>site/main-category/sub-category/product
Trouble is we are finding urls indexed by search engines like this:
[https>site/main-category/sub-category?cat=num] where the number displayed is the category for the products. The page renders (by title and canonical) as the correct sub category - but includes products only belonging to category number X. For each and every category number it is rendering a page with the url as described above.
As unsightly as this is our robots txt is blocking /? but that hasn't prevented the pages from being indexed. And, of course, Magento seems to include index,follow on virtually everything.
Any idea what causes the undesired urls to be generated?
Thanks for looking!
You need to install below extension for URL regenerate in Magento 2,
Its free extension and available in GitHub,
I may not have been clear about the issue when I described. Trouble is we are getting both correct url's AND the phantom cat=** urls. We cannot find where these are coming from.