

Or maybe you were looking for one of my popular posts:Īlternatively, you can go to my home page or browse my archives If there isn't, you could try searching my website for the content you were looking for: I'm not blaming you, but have you checked your address bar? There might be a typo in the URL.

We're very sorry, but the page you requested has not been found! It may have been moved or deleted. In my imaginary theme, I would implement the above something like this:
404 SAMPLE PAGE CODE
Mentioning the error code "404" isn't really necessary, but you can put it there if you like.
404 SAMPLE PAGE HOW TO
Now let's look at how to actually add a 404 page that's customized to your theme. How To Add A Custom 404 Page To Your Theme Very frustrating! A few years ago 404 pages were nothing more than the standard server 404 page, but in recent times developers and designers have taken it upon themselves to create more user-friendly 404 pages, to let you know where you are, why you got there, and where you can go now. This will often lead me to requesting instead of the GMail page I intended. I encounter 404 pages all of the time, usually because I type a lot of web addresses rather than use bookmarks, and I have clumsy fingers. Typically you will encounter a 404 error when something has been moved or deleted, or when you click a link/type a website address with a typo in it. All you need to do is have a file named ’404.php’ in your theme directory.Ī 404 'Not Found' error page is a page generated by the server to inform you that the content you were trying to access on the website cannot be found. htaccess file:ĮrrorDocument 404 /404.Adding a custom 404 page to your WordPress theme is simple. This will redirect to the home page but you can replace the value of the function to any page on your site, even for an external link.Īnd finally set up the new error document adding or adjusting the line below in your. The CodeĬreate a 404.html file in your root directory and copy the contents below: Redirecting Redirecting. This will lower the bounce rate statistics and search engines will reward that for sure. The main benefit of this solution is that visitors served this way will visit at least two pages on the site: the 404 page and the one where it’s redirecting. To see it in action just type a non existing url on this website, such as. I made a small page that simply redirects to the home page with the help of JavaScript after a couple miliseconds. In this article I’m going to present the solution I’ve implemented on this website. You can have a funny and clever 404 error page. It might even become your most visited landing page (if the site is not built properly). Even a “Page not found” page can become a conversion funnel if it’s done properly. Don’t loose website visitors and potential customers because of a poorly implemented 404 error page.
