That's a fact: It's very annoying to click on a link and find an Error 404. So what about a little bit of fun? In this tutorial, I'll show you how to create a Blue Screen of Death-like 404 page.

What’s a Blue Screen of Death?

The Blue Screen of Death (or BSoD) is well known Windows users: Imagine that you are typing something on Microsoft Word, or simply browsing the web. Then, for an unknown reason, Bam! Everything on your desktop disappeared, and all you see is a blue screen, display some error message.
You have to reboot your machine, and you’ll lost all unsaved changes. Cool feature, isn’t? ;)

Why customizing your 404 error page

As I said above, it’s very boring to cclick on a link and just see a page displaying “Error 404 – Not Found”. When they see a 404 error page, most Internet users simply exit the related website. And you just lost a visitor.

So, customizing your 404 page is a very good thing: You can add a link to the homepage, a sitemap, or a way to contact you. This way, the visitor who found the 404 error can still navigate throught your content.
And as I like funny things, we should definitely give a BSoD look and feel to our 404 error page, just like Galiacho did.

How to create a BSoD-like 404 error page

The HTML

Absolutely nothing hard here. Create a new file and call it 404.html. Once you’re done, paste the following code:

<html>
<head>
<title>- ooops! -</title>
<link rel="stylesheet" href="404.css" type="text/css" media="all" />
</head>
<body>
<span class="neg">ERROR 404</span>
<p>
The page is missing or never was written. You can wait and<br />
see if it becomes available again, or you can restart your computer.
</p>
<p>
* Send us an e-mail to notify this and try it later.<br />

* Press CTRL+ALT+DEL to restart your computer. You will<br />
 &nbsp; lose unsaved information in any programs that are running.
</p>
Press any link to continue <blink>_</blink>
<div class="menu">
<a href="index.html">index</a> |
<a href="contact.html">webmaster</a> |
</div>

</body>
</html>

Did you noticied the blink html element? Back at the end of the 90s, during the browser’s war, Netscape introduced this element to indicates that the page author intends the content of the element to alternate between being visible and invisible. This non-standard element isn’t W3C compliant, and doesn’t have support in Internet Explorer.

The CSS

The CSS part is just easy as the html. Create a blank 404.css file, and put the following code inside.

body {
    background:#0000aa;
    color:#ffffff;
    font-family:courier;
    font-size:12pt;
    text-align:center;
    margin:100px;
}

blink {
    color:yellow;
}

.neg {
    background:#fff;
    color:#0000aa;
    padding:2px 8px;
    font-weight:bold;
}

p {
    margin:30px 100px;
    text-align:left;
}

a,a:hover {
    color:inherit;
    font:inherit;
}

.menu {
    text-align:center;
    margin-top:50px;
}

Using a custom 404 error page on Apache server

If you’re using the Apache web server, it’s pretty easy to create your own 404 error page.
Once you uploaded the 404.html and the 404.css files on your server, edit the .htaccess file (If you don’t already have a .htaccess file at your server root directory, create one) and append the following directive:

ErrorDocument 404 /404.html

This code is pretty easy to understand: If a requested file isn’t found by Apache, the visitor will be automatically redirected to your super cool BSoD-like error page.

Using a custom 404 error page within WordPress

If you’re a WordPress user, nothing simplier than creating a custom 404 error page: Browse your theme files, and find the file named 404.php. If this file doesn’t exist, simply create it.
Then, paste the html code on it, and don’t forget to upload the css file as well.

Related Posts

No related posts.
 

13 Comments

  1. Posted August 31, 2008 at 10:18 am | Permalink

    Nice idea! I find it ironic that you’ve created a BSoD on a Mac :) Great 404 page. How many people do you think will re-boot there PC because of this page :P

  2. Posted August 31, 2008 at 10:19 am | Permalink

    Good enough to shock the user into thinking something went wrong with their computer itself! (if they use Windows).

    Good tutorial, :D

  3. Posted August 31, 2008 at 10:27 am | Permalink

    The “real” BSoD doesn’t have any borders, and you can’t even see the windows taskbar…But yes, chances are that a real newbie will reboot his/her pc :p
    I remember BSoDs when I used windows 98 ten years ago…That was so annoying. Switching to Mac and Linux is probably one of the best decisions I ever made ;)
    Glad you enjoyed the tutorial, guys!

  4. Posted August 31, 2008 at 11:56 am | Permalink

    Fixing a friend’s PC yesterday we got a BSoD in the window’s installer… Just reminds me why i switched to Mac…

  5. Posted September 3, 2008 at 11:11 am | Permalink

    This is pretty good trick. How the hell you could think of this? Impressed!

    Stumbled by Yan

  6. shanna
    Posted September 4, 2008 at 7:55 pm | Permalink

    brilliant idea. and yeah.. Microsoft is truly messy. But… been a MS-slave since 1989 and DOS. Didn’t have the courage to switch to Mac yet… but… I have to say, that I haven’t seen a BSoD since Windows 2000. thanks to all digi angels for that.
    always wanted a 404 page, but never got round to make one.
    thanks to you I now have a cute BSoD 404 page… back to the “good” old MShit-days

  7. Posted September 4, 2008 at 10:41 pm | Permalink

    @shanna: I had saw many BSoD on XP. I never used Vista exepted for some tests, so I never had one on that platform.

    @Yan: Thanks for stumbling! I really appreciate it :)

  8. Posted September 18, 2008 at 10:32 pm | Permalink

    very creative and can shock anyone who is not very good with computers and its really looking like a real bsod screen nice funny tut :D

  9. Posted October 1, 2008 at 4:01 pm | Permalink

    Ha..ha..this enough to scare the hell out of my sister.
    Will try to put on her site tonite ^3^

  10. Posted November 15, 2008 at 6:48 am | Permalink

    This is great! I’ll do this one to trick my friends!

  11. Posted December 4, 2008 at 7:54 pm | Permalink

    The possibilities with this are endless.

    Thanks for the inspirational idea!

  12. Posted January 8, 2009 at 4:54 pm | Permalink

    AMAAAAAAAZING !!! thnx a million dude !

  13. Posted January 27, 2010 at 6:24 am | Permalink

    Thank you for this. I will use it on a couple of my websites and site this page in the source via comment tags.

2 Trackbacks

  1. By How to: Create a BSoD-like 404 page on August 31, 2008 at 9:24 am

    [...] Original post by jbj [...]

  2. By BlogBuzz September 6, 2008 | Webmaster-Source on September 6, 2008 at 12:01 pm

    [...] How to: Create a BSoD-like 404 page [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

  • Smashing Network
WordPress Appliance - Powered by TurnKey Linux