Here’s a conversation I’ve found myself having too many times with clients over the years not to feel like it would be worthwhile to make my sentiments public. So here goes: it’s well-intentioned but short-sighted to configure your server to redirect all invalid URL requests to the homepage.
At first blush, the idea seems like it would offer a clear enough user experience benefit to be worth considering. Instead of the cold-water shock of a 404 page — which, however gentle, is still at its core a message that the user has done something wrong — you’re offering the front door of the site, from which the user would theoretically have the easiest time finding the page he or she was originally looking for (or any other). But the signal of the 404 error page is sent in two ways: in the form of the error message and available options presented to the user, and in the form of the 404 response code presented to the server making the request. There’s a reason why that code exists.