A custom 404 page might not seem like a big deal but are you losing traffic and affecting your search engine positioning without one? There are many benefits to you and your website visitors if you know how to create a 404 page that works.
What a 404 page is and when it’s displayed:
a 404 is an HTTP error page that gets displayed when a user tries to visit a page that does not exist. This happens for various reasons but some of the most common are when a page has been deleted, renamed or simply when the user has typed in the address incorrectly.
There is some debate over missing page best practices and whether or not 404 or 301 will give you the best SEO results as well as UX. To achieve the best results you need a method of combining both 404 and 301 approaches.
But what a 301 is and why is it important:
A 301 is simply a redirect that sends your user from one URL to another. This happens instantly without loading the first URL so the user is unaware that a 301 has been used. This is perfect if you’ve renamed a page or if you are launching a new website where multiple page names are different but the same or similar content is available as a substitute. Rather allowing a 404 error to load the best approach here is to set up a 301 redirect from your old pages to the most relevant new page. This helps google index your new pages and gives your user a seamless experience.
The easiest way to set up a 301 is with a .htaccess file where you first reference the location of your current URL and then the full HTTP address of your redirect. eg:
Redirect 301 /oldurl/ http://www.mysite.com/newurl/