This question already has an answer here:

I have a product which is accessible using 2 URLs in frontend:

domain.com/catalog/product/view/id/9068/s/url-key/ and domain.com/url-key.html

I want to redirect default product url (/catalog/product/view/id/9068/s/url-key/ ) to URL I specified on product page (/url-key.html) to avoid duplicated content.

I know I can add a redirect in magento for this specific product, but this needs to be done for all products in the store.

Search engines optimization is enabled.

If there is no way to enable these redirects for all product, maybe there is way to disable /catalog/product/view/... URLs?

marked as duplicate by Fabian Blechschmidt, Amit Bera, brentwpeterson, Marius Jul 13 '15 at 19:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • You're asking the wrong question. These URLs are normally not generated in any template code or the sitemap, so the question you should be asking is how a search engine has obtained that URL? My first diagnosis for this would be the SQL query SELECT request_path, target_path FROM core_url_rewrite WHERE product_id IS NOT NULL AND ( request_path LIKE 'catalog/product/view/%' OR (target_path LIKE 'catalog/product/view/%' AND options='RP')). – Melvyn Apr 28 '15 at 20:21

Are the URL Keys the same name at the tail end?



goes to> domain.com/kyloren.html

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