We earn commission when you buy through affiliate links.

This does not influence our reviews or recommendations.Learn more.

Lets take a look…

nginx-errorpage

Most likely, you will close that.

And this is the custom 404 page which I have implemented.

Most likely, you will either go to Home Page or press any of the searches shown below.

Geekflare-404

Thats how the custom page helps.

Now you know the advantage, and its time to implement them.

you’ve got the option to have a custom page in a number of HTTP status code events.

I would think of the following as essential.

Pre-requisite

I assume you have already built a custom page.

If you need some 404 images, it’s possible for you to get it fromElements.

Implementing in Apache HTTP

There are multiple ways to do this.

Ex it’s possible for you to either do this using Rewrite or ErrorDocument directive.

I will explain how to do with ErrorDocument directive.

Note: you may also redirect to some other URL in the event of these HTTP status return codes.

For redirection, you might just add a URL next to each code, like below.

Implementing in Nginx

Save the file and restart Nginx to get this reflected.

You see, this tiny change can have a big impact, so why not implement it?