Ordasoft - Professional Joomla Templates and Extensions

How to setup your 404 error page in Joomla 3 and Joomla 4

Posted by on in Joomla Tutorial
  • Font size: Larger Smaller
  • Hits: 1245
  • Subscribe to this entry
  • Print


For each error in Joomla CMS, a "Joomla error detail page" or "404 error page" is displayed.

When the "Show Errors" setting is turned off in "Joomla's Global Settings" → "Show Errors" and some error occurs or the user enters the wrong URL in the browser, the user will see a "404 error page".
More about: How to "turn on" or "turn off" the Error report in Joomla

How to setup your Joomla 404 error page

1. With the help of FTP or cPanel or Joomla File mnager, go to {your-website}/templates/{your-template}/ and open file: error.php.
1.a If you don't have error.php file, Please go to {your-website}/templates/system/ or {your-website}/templates/cassiopeia/ and copy error.php file from there to your template folder.

2. In error.php file, at the file begin after row:
defined('_JEXEC') or die;

add code:

if (($this->error->getCode()) == '404') {
header('Location: your-wedsite-URL');

where: {your-wedsite-URL}, any correct URL on your website which you need for show users when 404 error happened.

3. If you "website developer" and know PHP, you may change {your-website}/templates/{your-template}/error.php file exactly as you need for any errors types or set this page any design.

4. For Website developers: If your website - will have real error, and you will need to debug it. Please go to {your-website}/templates/{your-template}/error.php and remove code from for 404 error page redirect which you added at steps before.

Last modified on
Rate this blog entry:

Welcome to OrdaSoft Joomla Extensions and Joomla Templates. Try our Joomla extensions, Joomla Templates and build professional Joomla site for Real Estate, Auto dealers, Book libraries, Media libraries, memberships.


  • No comments made yet. Be the first to submit a comment

Leave your comment

Guest Tuesday, 23 April 2024


Wohnung Löbau Auf wohnen-in-loebau.de finden Sie bestimmt Ihre neue Wohnung in Löbau.