Keith Curreri

What makes a great 404 page?

In a previous post I wrote about how to technically make a 404 page. This post will cover what should go on a 404 page so that your visitors will not be left in the dark.

404 Page Must Haves

Some sort of description of what a 404 page is – Whether it is just some text that simply says “something went wrong” or something a little more creative, a 404 page should contain some sort of text that informs the visitor that there was a problem. There is a website showcasing funny 404 pages that you can use for inspiration if you would like to be a little more creative.

A link to the homepage – This is the easiest way for a visitor to get back on track if they are lost in your site.

A search box – If you have a site search, add it to your 404 page. This way people can find a specific page or post on your website. If you do not have a site search, and your site happens to have a lot of 404 pages, you should consider getting one.

Your site’s main navigation and sidebar – Be sure to include your main navigation bar which you include on the other pages of your site. This will give visitors more options for visiting your site.

Contact Info – Provide contact info in case the lost visitor has any questions or trouble.

Automatically notify you (the webmaster) of the 404 – It is not the user’s job to inform you about problems with your website. If you ask visitors to notify the webmaster when they encounter a 404 page, you have not only inconvenienced users, but they will most likely not bother to contact you with your problems. This is your job to fix, not theirs.

If you are using WordPress, the 404 Notifier is a great plugin which can be installed and will send you an email when a user loads a 404 page.

Bad 404 Page Practices

Don’t just say “404 error” – Most users will not know what a 404 error is. If you want to include the error code on your page, at least make sure that you have some sort of description for non-technical users.

Never redirect 404 errors to your home page – It’s confusing to users. If someone clicked a link thinking they would get to one page and they end up on another they will have no idea what happened.

Don’t make it complicated – 404 pages should be kept simple. Don’t add a bunch of other content that does not need to be there.

Conclusion

While it is a problem for the user when they land on a 404 page, there are things that the webmaster can do to help the lost visitor. Follow these tips and hopefully visitors will not bounce off of your website.

  • Share/Bookmark

Adding a 404 page to your website

How often do you run into an error page on a website that look like these? (Click on the thumbnails to enlarge)

These pages are called 404 error pages. A 404 error is when a page that you are trying to access on a website is not found. A lot of internet users do not know what a 404 error is or what to do about it. To them, it is just another unintelligible error message from the computer.

Now, what do you do when you do land on one of these pages? Actually, there is not much that you can do. You can click the BACK button and go back to where you came from or try emailing the webmaster, but other than that the default error pages are not very helpful.

Making a 404 page with .htaccess

If your web server supports .htaccess then this will be the optimal method for creating a 404 page. This only applies to a website hosted with a Linux OS.

Step 1: Create your error document file

A 404 page is just like any other page in your website. It can be in .html, .php, or in any other web language file extention. Just create a new webpage and name it something like “error-document.html”. Put it in your website’s root folder.

See my post, What makes a great 404 page? for ideas on what to put in your 404 page for it to be most effective.

Step 2: Create the .htaccess file

  1. Check and see if your site has an .htaccess file in the root directory. If it doesn’t, create a new file in the root directory and name it “.htaccess” (note the preceding period).
  2. Add the following line of code anywhere in your .htaccess file. Change “/name-of-error-document.html” to the path of your document.

ErrorDocument 404 /name-of-error-document.html

Step 3: Testing the 404 page

When you have completed steps 1 and 2 you should test your error page to make sure that you set everything up correctly.

Manually type a web address in your URL bar to a page on your site that you know does not exist. If your 404 page pops up, you installed it correctly!

Making a 404 page with a Windows/IIS server

Windows servers are a little bit more tricky as they do not support .htaccess. You can still create a 404 error page, but you will have to contact your website hosting provider to get specific directions because each hosting provider’s set up system is different.

Why should a website have a 404 page?

Most likely your website visitors will not see your 404 page. Inevitably a few of your visitors will see it, which is why it is important.

The default 404 page is not very helpful when a visitor runs into a dead link. A proper 404 page should provide some resources so the visitor visits another page and doesn’t just leave the site.

Conclusion

A 404 page is an important feature to any website. It helps you to keep visitors on your site as well as adds a special extra detail to your site which will set it apart from others.

  • Share/Bookmark

W3C Web Standards Benefits

Web standards – Web standards are a general term for the set of rules and technical specifications for website code established by the W3C and other standard bodies.

World Wide Web Consortium (W3C) – an international industry consortium dedicated to “leading the Web to its full potential”.

Websites and the technologies used to make them work are constantly evolving and standards need to be put into place to ensure that everyone has access to information as well as make web development faster and more enjoyable.

Standards compliance makes a website easier for people with special needs to use, is better for search engines, and is easier to maintain.

Some people believe that standards are limiting, but in actuality they remove much of the tedious labor involved with web development. They help coordinate with past technology and are mindful of future improvements.

Validating your code

The act of testing the validity of your site is easy. Just go to http://validator.w3.org/unicorn/ and type in the URL of the page you would like to validate.

Actually fixing all of the errors in your site is a totally different story, which can be very difficult at times depending on your level of experience and familiarity with standards.

Google will be your best friend when you are first learning about validating websites. I promise you that as you work more on standards compliancy you will get more familiar with it and it will get easier. You will eventually get to the point where you will write standards complaint code right from the beginning.

Advantages to having a standards compliant website


  • A consistent look and feel – With standards compliant code, all styles are defined separately in a central CSS file. Separation of style from content gives a consistent look and feel to each web page.
  • Improved search engine ranking – Web standards do not allow a lot of clutter in the code. With less clutter search engines have an easier time crawling through a site. A compliant website will also get indexed more accurately.
  • Easy to maintain – Having a compliant website makes the site easier to maintain since the code is cleaner which results in easier readability.
  • Save you money in updates – Since the site is so easy to maintain, the time it takes for someone to update the site will be reduced, which will save you money.
  • Cross browser compatible – Clean, valid code will display the most consistently across all browsers. Standards are in place to make sure that old browsers will still understand the basic structure of your documents.
  • Accessible to different devices – Proper, valid code makes it easy to display the content of a website on different devices, like cell phones, PDAs, screen readers, etc. This is also important for people who use unusual browsers, including voice and Braille browsers.
  • Faster loading sites Since compliant websites are properly structured, valid code helps in decreasing the file size and the download time.

Conclusion

With standards compliant code, web developers can make sure that a website is properly structured and semantically coded. It makes the site easier to manage, more accessible, and better for search engines.

Browser consistency is a common problem for web developers and starting out with standards compliant code will make cross browser compatibility much easier.

Cleaning up website errors is a tough process. It can be very frustrating when you first start to tackle them, but as you get better validating will be easier.

The mission of the W3C is to make the web a better place for developers and end users by encouraging worldwide standards. This effort will be greatly helped when web developers use the standards as a matter of course.

  • Share/Bookmark

Web Hosting: Linux trumps Windows

There are two main types of web server technologies, Linux and Windows. I would like to start out by stating that this post is probably a little biased. I’m sure that there are a few people who love Windows servers, but I don’t know any of those people. Linux is a great web hosting environment for any website.

Don’t let the name Linux scare you. The operating system that you are using on your computer is irrelevant. You don’t need to know how to use Linux in order to have a Linux web server. You don’t even have to use a command line if you don’t want to (however the option is there).

Benefits to Linux Hosting

For some time, when it comes to web hosting, Linux has been widely considered the best operating system for web servers. Many agree that it is the most reliable, efficient and stable platform for the demanding environment of web and mail servers.

Ease of use – It is very easy to host on a Linux web server. The actual process of uploading and hosting is practically the same for both Windows and Linux web servers. You can use almost all types of file extensions or scripts when hosting on a Linux server. Some of the more common extensions that are supported by Linux are .html, .htm, .pl, .cgi, .php, .shtml, .xml, and others. Essentially this means that you can host websites that use different types of server side scripting such as .cgi, .pl, .php, and .asp (with a plug in).

More control over your site – Only Linux will allow you to access your site via telnet or SSH. It’s possible to get telnet access on Windows, but very few hosting administrators offer it. Linux will also allow you to use .htaccess, another tool that Windows servers don’t allow.

Easy to move between hosts – A website designed to be hosted on a Linux based web server can be moved to another Linux or Windows based server easily. Moving a site hosted on a Windows server to a Linux server can sometimes be problematic.

Scalability – A website typically grows over time. It can start with a few pages of HTML and grow to suit the user’s needs. A web site designed for compatibility with a Linux server meets the scalability requirements without having to make any site wide changes.

Stability –A website hosted on a Linux server will have a high up-time; the Linux operating system is very stable and robust.

It can run Windows’ technologies – With the right plugins and configuration, you can run Windows’ technologies like .asp scripting and Frontpage extensions.

More widely used – Linux based web servers are more widely used because of the reasons mentioned above. With more people using this type of server, there is more support and help if you ever run into a problem (and the problem will most likely be easier to fix!).

Downside of Linux

To be fair, Linux hosting does have a few minor downsides:

A plugin is required to use .asp and Frontpage – Just install the plugin or contact your hosting provider to do it for you.

Integrating multiple Windows’ technologies – If your website depends on a lot of different Windows’ technologies integrated into the same system, it may be easier to use a Windows server. Linux, however, can run these technologies, and run them more reliably as well.

So Should I get Linux Hosting?

Definitely yes! Linux hosting is more reliable, easier to use, and it gives you more control over your site. I would highly discourage using Windows hosting. Remember, you do not need to know Linux/Unix or be using it as your computer’s operating system to use it as your web server.

For a side-by-side comparison of both server technologies, check out this article on Wikipedia: http://en.wikipedia.org/wiki/Comparison_of_Windows_and_Linux.

  • Share/Bookmark