Hello friends, welcome to my another blog post add custom 404 error page in joomla. Joomla is a well know popular cms (Content Management System). Joomla has many build-in features for creating a website. But joomla does not have default 404 page to show a broken URL. A 404 is really useful for guiding your visitors when they visit a broken URL on your site. So in this tutorial I will show the processes to overcome from this problem. Here I will show you two processes. You will manage 404 page or not found link using the below two methods. So lets start:

Method 1: Create a 404 page, add it to menu and redirect all broken URL into this page

Step 1: Create an article and change Metadata Options

The first step in creating an own 404 page is to create a new article. Go to Content Menu->Article Manager->New Article. Just follow the below image to create 404 page content and after creating the content save the article.




add custom 404 error page in joomla

The article will be accessible through a link similar to the following one:http://www.yourdomain.com/index.php?option=com_content&view=article&id=XX
where XX is the ID of the article. You can save this link because you will need it later.

Create a Hidden Menu and copy link

Now create a new menu group from Menus->Manu Manager->Add New Menu. See below image as a reference

add custom 404 error page in joomla

Now go to Menus->Hidden->Add New Menu Item. Put menu name and select you previously created article by clicking “Select” button. It will open a popup. Select “Single Article” from article tab and then click “Select/Change” from right side to select your previously created article. After selecting your article just click “Save” from top right corner.

add custom 404 error page in joomla

Now copy the URL from your menu and store it on a notepad since you will be using this URL in your error.php file.

add custom 404 error page in joomla

Create error.php file inside your template directory folder and paste the code

Now create error.php inside your templates/YourTemplate/error.php”. Open error.php in text editor and paste the below code if you are using joomla 1.5 version.

Open error.php in text editor and paste the below code if you are using joomla 1.6, 1.7, 2.5, or 3.x version.

Now you are done. Type in a URL such as yoursite.com/blahblahblah to be redirected to your custom 404 page.

Method 2: Create error.php page inside your template and put your text

At first create a page not found or error page in html. Just do the error page templating as you do to create joomla template index.php. You can take a reference from yourwebsite/templates/beez_20/error.php . Just do all the task according to beez_20 theme error.php and you are done.

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Add custom 404 error page in joomla
Tagged on: