Create a Custom 404 Page

Follow us on Facebook!

Create a Custom 404 Page

The default Error 404 page is less than desirable and if you are re-building a site you are likely to have broken links from the old site which could result in lots of 404 errors.

Undesirable as the 404 page is it really is important to make sure you have one that reflects your site theme. Follow these steps in Joomla 2.5 to create your own custom 404 Error page.

  1. Create a new Article called 404 - Error:404
  2. Write your new error message. Check out some of these great examples on CSS Design Awards
  3. IMPORTANT - Set the Robots to no index, no follow. This setting can be found in Joomla 2.5 under the Metadata Options tab
  4. Create a new menu called Error Pages and create a menu item under this menu called 404
  5. Assign the 404 - Error:404 article to the new menu item. Make a note of the article id
  6. Locate the default error.php file located in the templates/system folder
  7. Copy the file and open it in a suitable text editor such as notebook or codewriter to edit it
  8. Locate the line beginning:  defined('_JEXEC') or die;
  9. Add the lines:

    if (($this->error->getCode()) == '404') {
    header('Location: index.php?option=com_content&view=article&id=XX');

    Where XX is your 404 article id

The new code should look like this:

1. defined('_JEXEC') or die;
2. if (($this->error->getCode()) == '404') {
3. header('Location: index.php?option=com_content&view=article&id=51');
4. exit;
5. }

Copy the new error.php file to the current site template folder.

Your website is your online shop window and if potential customers find it difficult to navigate they are unlikely to translate into sales.

When you are working with your web developer to design your business website it can be difficult to be truly subjective about the layout of the site. You want to get everything on the home page after all!

Let us give you real and impartial advice by reviewing your website from a customers perspective.


To give you the best possible experience, this site uses cookies. Continuing to use means you agree to our use of cookies. If you'd like to learn more about the cookies we use please find out more