The structure of my url is http://www.somesomewebsite.com/ShowProduct.aspx?ID=12. I am doing a permanent redirect (301) to http://www.somewebsite.com/product-category/12/this-is-my-product-name/. However if the user types just http://www.somewebsite.com/product-category/12/ he/she is given a 404 error.What should my Canonical URL point to? http://www.somesomewebsite.com/ShowProduct.aspx?ID=12ORhttp://www.somewebsite.com/product-category/12/this-is-my-product-name/
Should the canonical tag point to the rewritten URL of the page even if it doesn't have a valid directory structure?
seo;redirects;url rewriting
The canonical URL should be the URL you want Google to show in their search results. So:http://www.somewebsite.com/product-category/12/this-is-my-product-name/