Overview
Most sites have a very basic page displayed when an error happens on the site. Whether a 404 Page not found error or any other kind of error, it is particularly important to retain users when an error happens.
There are 2 important ideas to keep your visitors with you:
- display information that's actually helpful: 4SEO will offer links to similar pages
- display that message within your regular template instead of a bland, nearly empty page
As most things in 4SEO, you define rules to manage how errors will be handled on your site. 4SEO comes with 2 default error pages, and lets you customize or add more, for the most common errors, to keep your visitors on your site when faced with a mishap.
When 4SEO is installed, the default Error pages rules may not be enabled. The reason is that we can only provide them in a limited number of languages. We don't want you to suddenly show a 404 in an unknown language to your visitors. 4SEO will enable them if it thinks the language is ok for your site. If not, translate the content and then enable the rules. Or create your own!
List of error pages
Going to Errors | Error pages
will show you a list of currently defined error pages. This screenshot is showing the default ones installed with 4SEO.
Click on a rule to modify it, or click the New
button to create another one.
Error pages rules are executed in the order they are displayed in the list.
You can re-order them manually by a simple drag-and-drop.
When to run
This is the standard rule configuration panel. In the case of an error page, you can choose to enable your rule for any error.
But you can also go a bit further and define different pages for different situations.
Multiple pages for same error code
You can have as many error pages as needed, even for the same error code. For instance, you can display different error pages for "Page not found" errors happening on your blog (page address starts with /blog) and for the same error happening on your shop.
Multilingual sites
This is certainly the most obvious use case: you should define separate error messages for each language. The way to assign an error page rule to a specific language is to enter a language code in the URL specification box:
In the above example, the error page rule will only apply to errors happening on Spanish language requests, identified by the es
code at the start.
Errors per site sections
Using the same technique, it's very easy to have more specific error messages for, say your shop or your blog.
What to do
Once you defined when a given rule should be used, you can define that further and tell 4SEO what it should do in case that error happens.
Error code
Select if you want to restrict this error page to only some type of errors. This lets you display a more appropriate error message in each case, and also hide or show optional content such as Suggested pages
The most common options would be:
404
for "Page not found" errorsAll
for all other types of errors.
The default rules installed with 4SEO covers these 2 cases. But you can be much more specific by having a separate page for 401
errors, where the user needs to login, or does not have enough access rights to perform something.
Joomla redirect component
In the case of a 404 error happening, before triggering your error pages rules, 4SEO will first check the Joomla Redirect component for any applicable redirect you may have defined. If any applies, it wil trigger that redirect instead of applying the error page rules.
Page title
The page title displayed at the top of the content. Cannot contain HTML. You can also leave the title empty and just use the next input field, Page content
, to write the entire message.
Page content
The main body of the error page to be displayed. Use the HTML editor to enter the content you desire. Make sure to test your display under various conditions and devices, such as desktop and mobile browsers.
Suggest similar pages
Probably the most important option for the "Page not found" error pages. If enabled, 4SEO will search pages with a similar address to the one that was requested and failed.
It will rank these suggestions with the most likely at the top and a default message suggesting visitors to try these links first will be displayed.
This is a great and very efficient way to keep visitors on the site when your pages addresses change, products are slightly renamed or moved around.
The screenshot above was taken with Joomla 3 default template. In real life, it will take the look and feel of your own website template.
Customization
You can use two input fields to enter custom messages:
- one displayed before the list of suggested pages, if 4SEO can find some
- one displayed instead of the list if 4SEO cannot find any suggestion
Menu item to use
When displaying its custom error pages, 4SEO will by default use your home page menu item. Joomla needs all pages to be associated with a menu item, in order to select which template and modules are displayed.
This may not always be the best choice as often home pages have a specific layouts, with a different look than other pages.
If you don't see 4SEO error messages properly, you may need to instruct it to use another of your menu items when displaying error pages.
This controls lets you select any of the currently created menu items on your Joomla site for that purpose.
Tip
Althoug you can create a specific menu item for your error pages, that's not at all required. You can just as well use one of the existing ones, as long as the final display (template, modules) suits you.