How to get 404 page to redirect to homepage?

I seem to be getting a lot of “page not found” 404 errors recently, how can I just have this page redirect to my homepage?

Thank you!

Best to fix the root cause of your problem so it doesn't grow and hurt your rankings or cause other problems…