close
blog-icon
January 23, 2023

What is a 404 error. How to make and configure this page correctly

Error 404 is the standard HTTP site response code: the page could not be found. As a rule, users see such an error when they click on a link that leads to an already non-existent page.

 

Causes of error 404

Most often, the reason for such an error is:

  • broken link;
  • incorrect page address change;
  • deleting the requested page;
  • error when writing the URL in the address bar.

The appearance of many 404 errors can be caused by a virus attack, for example, the placement of doorways on the site.

It is impossible to completely exclude the occurrence of a 404 error, it can occur on any site. For example: the address has been changed somewhere, some section or page has been deleted, and the old links have remained. Such a situation may occur when deleting product cards in online stores.

The best way to make sure that visitors do not get to the 404 page is to regularly check for “broken” links on the site. This applies to both internal linking and external links to other resources.

Why do I need to set up a 404 response code?

By itself, the presence of a 404 error on the site is not a problem. But so that the presence of such pages does not lead to a deterioration in the ranking of the resource, they must be properly configured—to give the server response code 404. It is this response that informs the search robot that this page does not exist, and prevents its indexing. This allows you to avoid duplicates and reduce the quality of the site.

If the answer 200 is given instead of the 404 code, a lot of empty pages will get into the index. They will create duplicates that will be scanned by a search robot instead of real-life pages with high-quality content.

In addition, if non-existent pages do not give a 404 response code, unscrupulous competitors can simply send them to the search index, for example, by posting links to such pages. New URLs are also created for non-existent pages of a competing site in order to increase their number in the search. As a result, the crawler manages to scan only non-existent pages and lowers the site in the SERP as low-quality.

Thus, the correct configuration and design of the 404 page is important—this is a prerequisite for the correct operation and successful promotion of any web resource.

Why do I need a 404 error page?

From a technical point of view, this is a regular site page that is issued in the absence of the requested document. It should inform the user that there is no document at such an address, and provide an opportunity for further work with the site. Otherwise, visitors may leave the web resource, which will lead to loss of web traffic and deterioration of behavioral factors.

How should a page with a 404 error be designed?

A standard 404 page is usually uninformative and has nothing to do with a specific site.

What is a 404 error. How to make and configure this page correctly

Sometimes, visited such a page, the user may not even understand what happened. Therefore, site owners are recommended to create their own 404 page. First, the page should be convenient and useful for the user, the visitor should understand that the page does not exist and be able to go to other sections of the site.

There are a number of requirements for the design of the 404 page from search engines. Google has repeatedly made recommendations on the issue.

Recommendations for creating a 404 page from Google

Based on these recommendations, the following ideas can be distinguished:

  • It should be clear to users that the page is not available—it should look different from other pages on the site.
  • However, the design of the Not Found page should be made in the same style as the entire site. This will help the user to understand that he was on the needed resource.
  • It is good if the page contains links to the main page, in this case, the user will be able to easily continue working with the resource.
  • It will be relevant to place a search bar on such a page so that the visitor can immediately find the information he is interested in.
  • Provide an opportunity to report the problem. This will not only show concern for users, but also allow you to additionally monitor and eliminate errors.
  • Promptly remove from search engine's index page that doesn't exist using Google Search Console.
  • When replacing a product with a similar one, it is worth redirecting to it so that the search engine does not consider this page a duplicate.

A properly designed 404 error page looks like this:

How do I create a page for error 404?

As already mentioned, from a technical point of view, this is an ordinary site page, and it is created using HTML. It can also be created using a text editor in all popular CMS:

After creating the page, you need to register the rule in the file .htaccess, which is located in the root system of the site. .htaccess is a special file in which you can specify additional rules and parameters related to the operation of the site.

So that when users get to a non-existent resource, a page with the 404th error is indicated, you need to register the following command:

ErrorDocument 404 http://www.site.ru/404.html

where http://www.site.ru/404.html—link to a ready-made page template for error 404.

Follow the above rules, and the presence of a 404 error will not worsen the position of your site, but on the contrary, it can become its advantage.

Interesting and useful error 404 pages will attract the attention of users and improve the behavioral factors of your resource.

FREE TRIAL

Start your free trial now