Open 404.php file in theme (if it doesn’t exist, then create a blank 404.php file)
Paste the following code in the file:
Categories