Use a canonical tag
The best option is usually to use a canonical tag to tell search engines that the preferred URL doesn't have those URL parameters.
This handles the duplicate content issues associated with URL parameters while still allowing you to use tracking parameters (such as utm_*
parameters for Google Analytics.) This will also correctly capture any link juice from external links that have the parameters.
Redirect to home page
Redirecting to the home page is the worst option.
Redirects to the home page are bad for usability. Users don't get the content they are expecting and there is no useful error message. They just find themselves on some unrelated page for no apparent reason.
Redirects to the home page are also bad for SEO. Google calls them as "soft 404 errors" and treats them just like real 404 errors. In other words, link juice from external links with those parameters is lost.
Ignoring
Ignoring the parameters is a viable option.
This essentially leaves it up to search engines to resolve the duplicate content issues on their own. These days they are pretty good at doing so. Search engines will typically detect the duplicate content, choose the most popular of the variants, and treat that as the canonical URL. The effective canonical will usually be the variant without the parameters, but sometimes search engines will make less optimal choices.
Users like this option because the URLs still work the way they expect them to.
404 or Remove Parameters with Redirects
Using a different status like 404 or removing parameters with redirects can work, but only if your site never uses tracking parameters. I wouldn't suggest this approach because Google Analytics and other web stats packages offer functionality that requires you to add tracking parameters to your URLs.
/foo/bar?url-param
to/
? Or would this URL resolve to the homepage anyway? eg./?url-param
to/
?