Dealing with Error 404, or Preventing Loss of Visitors

If a user enters a page address in their browser that does not exist or attempts to navigate to a site using an incorrect link, they receive a 404 Error message.

Most likely, this visitor will be lost to you. However, this loss can be prevented.

Insert the following line into your .htaccess file: ErrorDocument 404 /error.htm. Next, create the error.htm page containing an error message. Of course, you can assign any other desired name to the page.

The .htaccess file, which contains instructions for the server, should be placed in the root directory of your website. Here are some recommendations for the content of the error.htm page: Explain the visitor’s error in typing the URL, mention that the desired page can be found using the search or menu located on the site, etc.

Another option that can be implemented is to unconditionally and immediately redirect the visitor to the main page. It is important to emphasize that this method is very relevant for websites whose creators strive to rank their main pages high in the Rambler ranking, as this ranking is based on the traffic to the main pages of the sites.

Thus, any user who makes a mistake in typing the URL of the page and is automatically redirected to the main page contributes to your advancement in the ranking. Implementing this scenario is simple: Insert the line ErrorDocument 404 /index.htm into the .htaccess file. Following the example mentioned above, the name of the main page can be any, and that’s the name you should specify instead of index.htm.