you can use this plugin i think you will solve your 404 page solve..
WordPress version: 4.9.6
404 plugin installed: https://de.wordpress.org/plugins/404page/
Page url: https://landhaus-himmelpfort.de/
When I try to visit a non-existing site on my url and get a 404 error, every post is displayed. First I tried to change the 404.php in my theme's folder, than I moved to the 404page plugin (https://de.wordpress.org/plugins/404page/) but nothing helped. I already tried to deactivate all plugin but the issue remained.
My question is: How can I 'install' my own personal 404 page and why does WordPress display all my posts in the current state?