Set up a 302 redirect to relevant content. Also, it's preferable to have a designated 404 page (make it branded and light-hearted). The 404 page should have either a built-in relevant content view, high-traffic content links, or clear bottom-up navigation. In my experience, rerouting people to the homepage is confusing and often results in a bounce with no return.