I have a custom 404 error page on my apache (404.php) and it works normally, but if someone or any search engine requests the /404.php
page, the server returns 200 (OK)
, because the page actually exists.
I have already put the Disallow: /404.php
on my robots.txt
file to prevent Google from indexing that page, but I'd like to return 404, including to this page request.
Is there a way to also return 404 when someone reaches the 404.php
directly?