When your visitors try to access a page that does not exist, they are usually shown a bland page with simple information, like “This pages does not exist”.
However, you can easily redirect them to a beautiful and informative custom page that you have made.
To do this, enable tracking broken links in the General Settings > Extra tracking functions.
Once you do this, you will see an extra field where you will be able to enter the URL of the page you want to redirect visitors to.

But remember. It is good practice to set your custom 404 page to “noindex” so that it doesn’t show up in Google, Bing, DuckDuckGo and other search engines. You can set pages as “noindex” using almost any SEO plugin for WordPress.