Meadow Hill

Error 404, cat not found

It was the hope for blog hits from Smashing Magazine that did it. Blame them.

This image now adorns my error page:

bam!

Hopefully, it will calm people, and show them that while something is amiss, it’s not all that bad. Life will go on. The world will keep turning.

Unless, of course, you were searching my site for the launch codes for the nuculer missiles to fend off the attack from the aliens. Because, then, you know, life is pretty much over. But I rarely get hits from people looking for launch codes, so I’m fairly certain that things are going to be okay.

I’ve got four error pages set up right now. There’s the most common, the 404 File Not Found. That’s the one you get when — er — the file…is not found. The other three are the 401 Unauthorized error, for when you’re not supposed to be on a page, the 403 Forbidden when the server doesn’t allow access to that directory, and the 500 Internal Server Error when I’m not sure anybody knows what’s going wrong.

While we wait for the impending destruction of the Earth, lets do our part and keep America strong by making our error pages a little friendlier, shall we? And it’s really simple to do. Just add a few lines of code to your .htaccess file and you’ll be serving up those great pages in no time. Here’s what to stick in there:

ErrorDocument 401 /401-error-page.html
ErrorDocument 403 /403-error-page.html
ErrorDocument 404 /404-error-page.html
ErrorDocument 500 /500-error-page.html

Replace the page names with the page names you’re using. They can be anything, really. The server doesn’t care what the name of the error page is, since it’s simply serving it up. I should also point out, if you’re using something like WordPress or Textpattern, those systems pull data strait from the database, so unless you’ve arranged for some sort of caching, you could be sending people into an eternal loop.

Those lines override the normal server behavior, and tell it to go to another page. This helps you keep track of people going to the wrong places. It also helps you figure out ways to keep them from going there. Seeing a lot of the 500 errors, for instance, will tell you somehow you’ve messed something up and people aren’t seeing what you intend.

Since I’m using Mint on this site, I’ve also got something that helps me track those errors. Jeff Miller came up with an error tracker pepper that lets me follow those very errors. There are many ways to analyze your error data, such as using Google’s Analytics, or many other statistics products.

Nicer error pages

Hopefully, the comfort of a silly-looking cat macro will help to ease the pain and suffering from the messed up browsing experience. I’ve tried my hand at creating something that helps the users fix the problem, not make the situation more difficult. Error pages don’t have to be just about errors, they can be about solutions.

I’ve been meaning to work on this for a while. I had a non-specific error page, but it was wanting. Adding the error-tracking pages through Mint, and more specificity, it will help all involved. There’s a lot of good ideas following the examples at Smashing Magazine.

Still, if anything goes wrong, I’m gonna blame it on the cats.

---

Elsewhere

Melody: Community Powered Publishing: When they open–sourced Movable Type, I figured somebody would start doing something like this. #

Links feed / Archive