How To Avoid 404 Errors
Few things will disperse website visitors as quickly as a 404 error. But what causes this phenomenon, and how can you avoid it?
A 404 error is a standard HTTP response to a web browser’s request for a page that can’t be located on a server. Typing “404” into Google reveals half a billion search results, some of which lead to pages that are no longer available. That creates the pleasingly circular situation of a search for missing pages revealing pages that are, indeed, missing.
Most websites will have their own versions of a 404 page. Some are artistic, like a Pacman ghost being trapped between two giant ‘4’ characters. Some are witty, with South West Trains spelling out 404 in tracks as an animated train rolls past. But the vast majority of 404 pages are dull, offering insincere apologies with little explanation as to why that content is no longer available. Typical messages include “404 Error”, “HTTP 404 Not Found” and “The requested URL was not found on this server”. Sadly, none of these provide much comfort to members of the public who have to retrace their browsing footsteps and follow a new path.
These 404 errors may occur for a number of reasons, including:
- Deleted content. Let’s say your clothing website used to list bootcut jeans, but changing fashions mean they’re not selling any more. Deleting the page might seem logical, but historic links or out-of-date search results might lead consumers to that content that’s now vanished.
- Moved pages. If content is moved from one page to another (such as during a rebranding exercise), the webmaster should redirect old URLs to new ones. If this isn’t done comprehensively, the browser has no way of knowing where traffic should be directed to.
- Revised links. Companies sometimes change the title of individual web pages, to improve SEO results. A page of bootcut jeans might be retitled as skinny jeans as fashions evolve, but the bootcut URL might be floating around in browser histories or on unaffiliated third-party websites.
- Maintenance. If your web hosting company isn’t as dependable as WestHost, your site might experience downtime. It’s also possible that pages may be temporarily offline during redesign or development work, triggering an error message if anyone tries to view them.
- Complex addresses. If the subpage in question involves multiple backslashes and hyphens, it can be easy for characters to be lost during copy-and-paste or in hyperlinks from other sites. If a single symbol is lost from a web address, the result will almost inevitably be a 404 error.
- Permission conflicts. Many web pages can only be viewed over a secure server, or require administrative approval to access them. This commonly manifests itself with a description like “You do not have permission to access this resource”. Websites may also display this message if their SSL certificate has been incorrectly configured.
Resolving 404 issues can be a panic-stricken process if the problem is already occurring and there’s pressure to resolve it. Firstly, run a Google search on the exact message being displayed – this will provide clues about the cause. If this explanation encompasses points 1, 2 or 3 above, the solution is fairly obvious. For more complex issues like points 4 to 6, web forums may contain suggestions for remedial action. It’s always worth searching Twitter with the #[sitename]down hashtag, to see if other people are reporting similar issues. If third-party links are to blame, a polite message to the webmaster with a correct link can resolve the problem since nobody wants to host duff links. Finally, try to keep sub-page addresses simple without venturing too far from the root directory – human error when inputting addresses remains a leading cause of 404 errors.