Your Web Site Is Broken - The 404 page
Author: Alan Richardson
A common problem with web sites is the 404 page, the page that is shown when the page the visitor asked for does not exist.
Common problems are:
- lack of a 404 page
- custom 404 page does not support visit continuation
Lack of a 404 page
If I visit your site, try to go to a page that doesn’t exist, and you don’t have a 404 page, then I might see this:
That would be bad.
My journey would probably stop at that point. And you probably don’t have any metrics in your google analytics, you would have to check the raw access logs to see the 404 requests.
We want a Custom 404 page
The custom 404 page should:
- tell people the page could not be found
- have your sites branding header and footer
- support on going navigation
At a minimum the ongoing navigation can be your header links.
But I like to offer the user a choice of ongoing links then they might be able to find the page they were looking for e.g.
Some sites offer a search page as the default:
If that is the case then make sure that search actually works.
Make sure the 404 page has 404 as a status code
If you are using a blog system or CMS then this will probably happen automatically, but it is important that when you see the 404 page, that the web server has served it with a 404 status code.
You can see this if you open the browser developer tools and check the network tab is showing a 404 status code.
Many tools don’t find this problem
This problem will escape most:
- link checkers
- SEO tools
And SEO tool is likely to check if a
404.html is present, but not that it is returned when we try to find a page that does not exist.
How to implement
The easiest thing to do, if your CMS or blog does not support this out the box.
- create a simple
- have it in the root of your public web folder
- amend your
.htaccessfile to have a 404 redirect
ErrorDocument 404 /404.html
How could this happen?
This often happens when people move pages around on their site, but then do not redirect from the old url to the new url.
This is a mistake in itself, and if it is compounded with a non-working 404 page then you will lose visitors.
- visit your site
- type in a url that does not exist e.g.
- do you see a 404 page?
- does the page have your branding with the header and footer?
- does the page offer the ability for someone to continue their journey?
- open the browser dev tools and check if the Status is “404 Not Found”
Have you tried our free online Twitter Client Chatterscan.com? Designed for identifying shareable content on twitter quickly.