If a visitor clicks on a link to your site that contains a path to a page that doesn't exist, a 404 Error page will be displayed. This 404 Error page may be one that is built for your 3rd Party Template, one you created yourself, one that comes from the Joomla core files or one that your hosting company has for any bad links to your site.

You can create redirects for the bad links. This way the visitor can be redirected to an appropriate page on your site that does exist. Of course you can't possibly create a redirect for every possible page name for your site, but you can see a list of the most common bad links under Components -> Redirects. Sort by the heading of Hits to see the bad links with the most hits.

Where do these bad URLs come from? It could be that you removed a page, put it into a different category, or changed the alias for a page. Someone had a link or a bookmark to the earlier page. Now, when they click on that broken link, they get the error page on your Joomla site. It could also be that there is a mistyped external link that is pointed to your site. 

Too many bad links to your site can harm your SEO and frustrate your visitors.

A custom 404 Error page should be created for any additional random bad links or when someone mistypes a URL. Click on the link below for instructions for:
How can I create a custom 404 error page for my Joomla 3 web site?

How to create Redirects in Joomla 3+ with the Redirect component

Joomla has a method of creating redirects for bad URLs associated with your site. Going this route is a little easier than adding all the pages to the .htaccess file. Additionally, some hosting environments do not acknowledge the local .htaccess file.

plugin system redirect

You must first enable the plugin. Go to Extensions -> Plugin Manager. Enable the System - Redirect Plugin.

Now, go into Components -> Redirect. You will see a list of all of the bad URLs for your site. These are URLs that came from outside sources or from other pages on your own site that have broken links to other pages. If they came from your own site, you will see what page has this link under Referring Page.

We suggest that you start with the pages that have the most hits. Get the worst ones out of the way. If you see a red circle next to the URL, this means that there is no redirect for this page or it is disabled. Click on the actual bad URL to get to the page where you can type an appropriate new URL.

Type in the replacement URL for an appropriate page on your site. You can type in the complete URL, including the http://,  or the URL without the http://. You can also just type the path after your domain name. 

If the bad URL makes no sense, or there isn't a good page to redirect it, type in the URL to your landing page or maybe just or an existing site map page or other page that leads them to the proper location.

Change the status from Disabled to Enabled. If you don't do this, the redirect won't work. Click on the Save button.

Test this redirect in a new browser tab. Copy the bad URL and paste it into the address bar. See if it goes to your redirect page.

NOTE: redirects will only work for pages within your domain name. If someone mistypes the actual domain name, or adds the wrong extension, you have no control over that unless you own the domain names with the other extensions.

How to create Redirect 301 in .htaccess

Another way to create redirects is by adding lines to your .htaccess file. You should redirect the visitor to specific pages when they click on a link to, on or type in, the non-existent URL. A custom 404 Error page should be used for any additional random bad links or when someone mistypes a URL. 

As mentioned before, you can see these bad URLs under Components -> Redirects. Here there will be a list of URLs that people have used to get to your site. There is a column labeled Hits. Click this heading and it will sort the list by how many hits the URL has received. You may need to click it twice to see the URLs with the most hits. You should make Redirect 301s for the URLs with multiple hits. Likely, there is some bad link from a search engine or an external website that displays this URL.

There should be a file named .htaccess in the root of your Joomla 3 installation. Before editing this file, make a backup copy. To edit .htaccess, download it to your own computer with an FTP program. You may also be able to edit it through the control panel and file manager with your hosting company. Open up the document in a text editor like Notepad++, NOT A WORD PROCESSOR. At the bottom of the document add a new Redirect for each bad URL that your visitors are frequently landing on.

Type in Redirect 301, followed by a space then the local path to the bad URL (without the http or the domain name). After this add a space then put the full URL to the correct page. This will have your site's domain name in the path.

Redirect 301 /dog-breeds/pomeraniums http://mywebsitename.com/dog-breeds/pomeranians

Once you have the Redirect 301s created for the common bad URLs, you can now decide if you want to edit the error.php file to look like your other web pages, or add a PHP redirect in the error.php file to go to a page you created in Joomla.