Contents Magic

404 is your worst enemy - make it a friend.

November 21st, 2007 ·

A while back I took over the maintenance of a site. The site was transferred from one server to mine, and the after the transfer I found that the site was not maintained properly. So I went on to fix a few things.

The thing that was most horribly wrong with the site were non existent URLs. These urls fall in the following categories.

  • Incorrect Posts urls
  • Transparent css images
  • favicon.ico

Now whenever apache encounters a url that does not exist, the 404 mechanism of wordpress kicks in.Now generally, it is pretty cool to see that your users do get to see something on the page like related posts , but in case of favicon and transparent css images, these pages are never shown to the user, even though they create a lot more load on your cpu and consume a lot more bandwidth then the actual css image or favicon was supposed to use.

So here is my advice for your site. From day 1, use the Redirection plugin for WordPress. Although the redirection plugin is meant to redirect urls , it provides a more basic tool to determine where do you need the redirection in the first place. Armed with this knowledge, you can then go on and set up your redirections using any of the 300 level redirection codes, which gives an added advantage of passing the pr juice to the actual page in case someone has linked to you incorrectly.

Once you do that you can sleep at night much better, with the peace of mind that your cpu and bandwidth are not going down the drain.

Browse more posts marked in:

;

10 responses so far ↓ I do follow BTW
  • 1 Beauty Product Blog // Jan 7, 2008 at 12:58 pm

    I recently started helping a friend manage his site, and it was a directional nightmare. He had lots of pages he had renamed or deleted and all these old links and pages were still around. This plugin was a big help in cleaning up things for us.

  • 2 Thiru // Feb 24, 2008 at 1:29 am

    I hate to see a 404 page. Atleast some of the blogs/sites post a nice list of their “best posts” page which is useful.

  • 3 Gimp Tutorials // Mar 11, 2008 at 4:52 pm

    Good article!

  • 4 Theme Lab // Mar 15, 2008 at 7:16 pm

    Well with WordPress all you have to do is create a 404 template called 404.php in your theme. With mod_rewrite enabled all 404 pages will have this template displayed, which could have a sitemap, search box, etc. This is what I do on my site.

  • 5 John Doe // Mar 16, 2008 at 12:04 pm

    Theme Lab, I am afraid you missed the point. No doubt the 404 template pages are good to provide your stranded users some relevant information and your users may check some related info on your blog. But these 404 pages come into play only for users who followed a bad link. The idea of the checking 404 logs is different. Your goal should be to minimize the number of 404 entires in that log in the first place.

    Moreover, for things like favicon and missing images in css , your 404 page is never shown to the end user , but you do pay for its bandwidth and cpu cost.

  • 6 Las Vegas guy // May 9, 2008 at 4:34 pm

    John makes a good point, you should try to minimize the number of 404’s you get. BUT if you have moved your site like I have, you have potentially thousands of old/weird urls out there. I’ve been 301ing them as I find them, but customizing the 404 page is a great idea. I like putting the search box and sitemap there.

  • 7 child safety // May 28, 2008 at 2:34 pm

    good information but I don’t have enough time to see 404 pages.

  • 8 child safety // May 28, 2008 at 2:36 pm

    Awesome information! but I don’t have enough time to see 404 pages.

  • 9 FireFighter Jobs // Aug 7, 2008 at 1:56 am

    I always create a an error landing page with more search options. This helps with exit and bounce rates and with SE’s.

  • 10 banzai water slide // Jul 24, 2009 at 1:47 pm

    Thanks for the tips.Now,404 is the best friend of mine

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>