Setting up a custom 404 page

on 28 June 2006.

I realised today that I didn't have a proper 404 page and some of my links have changed recently. It is also quite astounding what crap the search engines can sometimes index. One wonders what the use is of submitting a sitemap to Google if it just stubbornly refuses to GET RID of a link like

Email benefits Web Statistics Tailormade4you Website Design ...

Full control over your email accounts - have as many as you need with our webhosting packages.
www.tm4y.co.za/hosting-features/email-benefits.html - 14k - Supplemental Result -

I had moved all my hosting related pages to our new site dealing specifically with Hosting (http://www.internet-web-hosting.co.za) and deleted the hosting related pages from this website. But no, Google, in its wisdom, KNOWS WHAT'S BEST. 

Supplemental Results - the bane of my life.

So I decided to set up a proper 404 page. I saw in some research that it is probably a good idea to make your 404 page a search page. Now that's a cool idea!

So I set it up as follows:

  1. I created a Static Content page called 'search the site'.
  2. Then I inserted the search module inside the Joomla content. This is how you can do it: 

    Use either MosModule or Modulebot2. I used to use Modulebot2 previously and it still works, so I just kept on using it. You need to install it and rember to activate it in your Mambots section.

    Create a test page to see how to use the parameters.

    If you insert  { modulebot2 list }  (take out the spaces between the text and the brackets!) in your content, you will see the following on the front end:

    Modulebot2 Usage:
    { modulebot2 module=module name }
    { modulebot2 position } - position = a block position (user1, top, left, etc)
    { modulebot2 list } - display a list of modules and block positions

    Available Modules  Available Positions
    Archive   banner
    Banners  bottom
    Latest News  inset
    Random Image  left
    Search  top
    Newsflash  user3
     

    This way you can see exactly what your modules are called. Now if you want to include the search module you would include { modulebot2 module=search } in your content. 
     

  3. I linked the Static content to a Menu Item called 'Search the site'. Then I went into my OpenSEF Configuration. In the SEF TAB there is a setting where you can set the 404 page - I set this directly to http://www.tm4y.co.za/search-the-site.html. The OpenSEF component itself created the Search Engine Friendly URL based on the menu item that I created for the Static page.

 

Twitter Updates

Web Trends Blog Entries

TM4Y Web Trends Blog - Trends in Web Design, SEO and the Internet in General
Tailormade4you is a web design company that specializes in building websites that offer real value to businesses. This blog contains some thoughts and reflections on the stuff that we deal with on a daily basis - building sites, keeping clients happy and learning all the time.