I have a site which changed from one shopping cart to another.Previously there was an .htaccess file which redirected all the old URLs to the homepage. I changed it to report a 404 for any URL not found on the website.Is it better to request these URLs be removed from Google's index via Webmaster Tools or keep them and use a rewrite in the .htaccess file?
Is it better to remove old URL from google via webmaster than 301 rewrite?
seo;htaccess;google search console
If you know the equivalent URL in the new shopping cart, do a 301 redirect to that URL. This is good for users, as they end up at the right place; and good for SEO as robots will gradually update to the new URLs and you keep the Page Rank.If you don't know the equivalent URL, 404 (edit: or more correctly as Metalshark pointed out in the comments, 410). Robots will gradually remove these URLs from their indexes, and you can provide some useful tools/info to users to help them find what they're after - e.g. a prominent search box on your 404 page.You should never redirect 'page not found' type requests to the homepage. This is bad for users (as they end up in the wrong place) and bad for robots (as they don't know that the URL they requested no longer exists).