Occasionally, a user may do something that confuses Drupal, such as typing a wrong page name or trying to access content they shouldn't. These will generate 404 and 403 errors, respectively.

A recent SEO newsletter, they mentioned the value of letting Drupal handle these errors:

Your unique 404 error page should look like a regular page of your site. It should include your site's header, footer and navigation bar so that the site visitor can easily click on another area of your site. The content of this unique 404 error page should contain text explaining that the page selected is no longer available along with contact information so the site visitor has the option of emailing or calling your company.

The same more or less goes for the "access denied" (403) error message. Let them know they did a no-no and try to explain why.

Just go to "Create content" and select "Page." Some might title them "Access Denied" and "Page Not Found" but you can call them whatever makes sense to you and your users. When you submit them, note the node IDs (the last number in the link displayed in your browser e.g. http://www.example.com/node/3 -->nid=3). Then click Administration >> Site configuration >> Error handling (or Administration >> Site configuration >> Error reporting for Drupal 6) and enter "node/nnn" in the appropriate boxes.

Page not found

Here's the HTML for one site's 404 page:

<p>Sorry! The page you were looking for no longer exists. We redesigned our site and many of the pages have changed.</p>
<p>&nbsp;</p>
<p>If you are unable to find something on our new site or have a question about our site or services feel free to <a href="/contact">contact us</a>.</p>
<p>&nbsp;</p>
<p>--Webmistress</p>

Access denied

Here's the HTML for one site's 403 page:

<p>We're sorry, but you must have permission to view the page you requested.</p>
<p>&nbsp;</p>
<p>If you are already a registered member of this site, please try <a href="user">logging in</a>.</p>
<p>&nbsp;</p>
<p>If you are not a member, you need to <a href="/join_us">join us</a>.</p>
<p>&nbsp;</p>
<p>If you have any questions about our site or group, please feel free to <a href="/contact">contact us</a>.</p>
<p>&nbsp;</p>
<p>--Webmistress</p>

Don't worry that you haven't created the "join_us" page yet. This is an advantage to having URL Alias support (the Path module) enabled. Just add to your to-do list to create this page when you get to the "Creating Content" chapter in this book.