How to Use 404-Error-pages and Still Help The User

Did you forget to renew an old url with a “redirect 301″, or did the user of one or another reason visit your blog and didn’t got the result they wanted, then it’s awesome that your system is set up to present 404 pages.

404-pages is a special error page where you can tell the user that he or she is unfortunately landed on a page that “does not exist.”

How to Set The Error Page in The Server’s .htaccess File

ErrorDocument 404 http://yourdomain.com/404.php

Can Your Web Hosting Configure 404-pages

On many web hosting services, you can via a corresponding control panel set up 404-error pages. If your webhost does not support this you can using “mod_rewrite” make a setup to take account of queries on files and directories:

# Request is not a file
RewriteCond %{REQUEST_FILENAME} !-f

# Request is not a directory
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule -? /404.php [L]

I’m not going to explain any further, because I think most of you is having a WordPress blog/Blogger blog which makes it so easy to manage 404 pages. However you can edit it by going into the code editor and then take the 404.php file.

You can find “dead links” on your blog using a tool called “validator” which is created by W3.org.

Good Practice for 404-Error-pages

  • Represent your blogs main overview page, so the chance to gather and help the user increase
  • Show phone number (if any), contact information or a support option on the page.
  • Let the layout and design clearly reflect that the user has landed in your business
  • Try to prevent Google from indexing your 404-error pages
  • Communicate at eye level without the use of technical terms (by no means all eh a “404 error” is.
  • Make possible a search or a sitemap that can guide users on track

Hint: Create a 404-error-widget from Google, so users can find your content via a search See more on Google

How to Prevent Indexing of Content

There can often be folders, pages or other files, there is no reason for users to find in Google’s organic search results. It can be anything from file folders with small pieces of artwork that you use to style your Web layout with your “lie-in-cart pages, business conditions, 404 pages, or miscellaneous documents that you will not be indexed by Google.

Use Nofollow, Noindex Meta Tag

A very simple way to keep search engines away is to insert the following code in the page’s HTML header:

<meta name=”robots” value=”noindex,nofollow”/>

Use Robots.txt

Using a robots.txt file let you tell search engines exactly what areas of your blog you do not wish to get indexed. Simply create a file named “robots.txt” and place it in the root of your website. So the url is this:

http://blogname.com/robots.txt

Example of an Robots.txt-file

User-agent: *

# Can’t be indexed

Disallow: /private/
Disallow: /404.php
Disallow: /pdf/
Allow: /private/can-be-indexed.html

User-agent: Googlebot-Image

Disallow: image.jpg

In the example indicates “disallow” to the folder or file which is then not indexed. Labeled “Allow:” you can select individual files or subfolders as well be indexed. Garden gate “#” you can use to make a small description of yourself that can help you organize the contents of robots.rxr. If you wish only to exclude “Google Billedsøgnin” from indexing the various pictures, write “Googlebot-Image” by “User-Agent:”. The folders or files that you enter on the lines then in robots.txt will not be indexed and displayed in Google Image results.

This definitely is a hardcore article and sorry for that. Hope you could understand it!

4 Comments

  1. The article is very informative.
    But i need one help.
    I delete 18 pages from my blog but now i want to stop google from indexing these pages.
    And i really don’t know how to add these pages in my Robots.xml
    Can you help me.

    Reply to this comment

  2. Hardcore tutorial Mikkel!

    Personally I’m immune to 404 pages, if they’re customised or not. Am I the only one? Even if they are customised I generally don’t even take notice of it – unless it’s got a funky image or it stands out in some way.

    Usually the page has the frame (header, sidebars) still intact so it’s just a matter of hitting the home button to get back to the homepage

    Sarge | BeginnerBlogger.com
    .-= Sarge | BeginnerBlogger.com´s last blog ..Guest Post Interview: Derek Jensen =-.

    Reply to this comment

  3. @TechMaish Well I don’t think there’s no way doing that. There’s a WP plugin called ‘robots meta’ which can set them so Google doesn’t follow. You can set that setting on for a week and then delete those pages again.

    Reply to this comment

  4. The 404 page is very important and I try and list a few things on that page that might help the user a bit more like search box, recent and popular posts. This might help the user abit more, but thats just my opinion.
    .-= George Serradinho´s last blog ..Tips For Creating First Post With WordPress Thesis Theme =-.

    Reply to this comment

Leave a Reply