How to redirect to 404 page with .htaccess?

22 January 2023 281 Reading time: 9 second

You can redirect to a 404 error page by adding the following code in your .htaccess file:


ErrorDocument 404 /404.html

This code redirects the user to /404.html when a 404 error code is received.

Similar articles