Any site that has been rebuilt (or simply built for that matter) will likely experience some level of missing/broken pages. Even if you are "Mad Eye Moody" level diligent with your site and you ensure the entire implementation embodies perfection, there will be users who accidentally mistype a URL, click an out of date link or simply try typing various values into their address bar in order to see what lies hidden within your site architecture.
If you have not put the appropriate code in place, this is the point where the user sees the ubiquitous 404 error page, a non-formatted site error or (worst-case) a directory listing showing all of the supporting files for your site (a security nightmare).
If, however, you have thought ahead, this is the spot where you are able spin the visitor around, point them in the right direction and capture extremely useful analytics that benefit your future site architecture, all at the same time.
Obviously, the ideal visitor experience doesn't include an error. But, when one inevitably occurs, best if users are none the wiser.
How do you do this? Baby steps.
Step 1 - Create a 404 Page
This page is often referred to as a 404 Page because the 404, "Page Not Found," error is so widespread. There are, however, plenty of errors that a visitor will stumble across and you need to ensure that you don't limit your response to a single type. A 404 Page is very easy to setup. It simply exists as another page within the site (hidden to menus, navigation and search engines) to which the server redirects when an error occurs. The most basic 404 pages simply inform the user that the page they are looking for cannot be found. Usually, a few instructions are put in place to help the user on their way. For example:
We're sorry. The page you are looking for can't be find. Please try one of the following:
- Check the web address to make sure it is correct
- Try to access the page directly from the site menus
- Access the site search
Step 2 - Create Redirects
URL redirection is the process of forwarding the visitor to the correct destination based on the URL. This can allow multiple marketing URLs to direct to a single location in order to capture analytics or simply to facilitate the user to the correct location when using a outdated or mistyped URL. It goes something like this:
- Check your latest site analytics
- Note the URLs that are being accessed the most often that are causing errors
- Create pages at these locations OR create 301 redirects that take users to the correct page
Step 3 - Make a Smart 404 page
By merging the first two steps together, you can help create a Smart 404 page. A Smart 404 page auto redirects the user to the correct location while capturing that an error occurred. During the capture process, the server can send out an email, write to a database or notify the site administrator through other methods. Writing to a database gives you the capability of sorting and filtering based on the number of times a particular error has occurred. In instances where a redirect is not available, search results based on the URL can be returned directly within the 404 page, removing steps for the user and turning a potential obstacle into usable content.
Step 4 - "Smart 404?" Try "Genius 404"
Don't simply return search results. Take the terms located within the URL and give the users concrete suggestions based on keyword matching OR simply take them to the top keyword match (e.g. Feeling Lucky). Don't just assume you got it right, make certain to dynamically place a notification at the top of the page letting the user know that they tried to access a URL that didn't exist and you think the page you took them to might be what they were looking for. Make sure to continue to give out alternative suggestions as well.
If you you do the above correctly, a user will (ideally) be taken to their intended location, given suggestions to alternate locations that may suit their needs, or (at the very least) be informed in a friendly manner that the location they were attempting to access is simply not available while giving basic advice on how to locate what they need.
Remember to constantly check your log files, database entries or emails in regards to errors that are occurring on your site. This not only enables you to help address redirection issues but may also give you insight as to what the clients are hoping to find on your site and allow you to shift your marketing messages and site content appropriately. If a term continually pops up and you don't have a relevant page to which you may direct the user, it might be time to revisit your architecture and content to keep your site relevant.