• Register
57,980 points
11 5 5

Want to solve programming problems and get paid for it? If that sounds interesting to you then contact us.

Error 404 (Error 404) is the code header of the HTTP response to the browser about the status of the HTML document, which reports that the server did not find the web page requested by the client program. The digital code "404", as a rule, is accompanied by the message "Page not found" ("Not Found"), less often - a detailed explanation of the cause of the error.

The status code is indicated by three numbers in a specific sequence:

  • the first indicates the class of the state. In this case, "4xx" indicates a browser error (Client Error) - an incorrectly typed site URL in the address bar field or the absence of a page on the server;
  • the second - "0" - implies a protocol syntax error, belonging to the "40x" error group ;
  • the third digit in the "404" status code specifies the client's error - the document at the specified address was not found.

In other words, a 404 error informs the user that the server was found, but the requested page could not be found, there is no information about the page specified in the browser.

Russian national domains at a discount - Domain RU, the domain of the Russian Federation.

Why 404 error occurs, what does it mean

There are different reasons for the appearance of the 404 error. It occurs when:

  • the visitor entered the wrong address of the web resource;
  • The page URL was rewritten, but the broken link remained on third-party resources or in browser bookmarks;
  • the file name on the server and in the code do not match;
  • the page was moved or completely removed from the site.

In rare cases, as an exception, the "Error 404" message appears when the server is not working correctly, the resource is attacked by a virus.

How to fix a 404 error on someone else's website

For users who have encountered this phenomenon on someone else's site, the guide to action is as follows:

  1. Check the URL in the address bar for typos, try re-entering the address.
  2. Reload the undetected page.
  3. Return to the previous page and try again to go to the desired one.

Services to help you find and fix 404 errors

On website, the webmaster uses several methods to identify non-existent pages, broken links.

Google Webmasters (Console for Google Webmasters)

Diagnostics use tools for webmasters from Google. For this:

  1. Go to the toolbar.
  2. Choose a website address.
  3. In the left field, find the line "Scanning" and expand the list.
  4. Select the option "Scanning Errors" from the list.
  5. In the right field under the heading "URL Errors" select the "PC" tab.
  6. One level down in the "Not Found" tab, the number of pages with a 404 error will be indicated.
  7. The following is an expanded list of those pages on which the error was found.
  8. After editing the errors, the pages are marked with a checker.
  9. Click on the "Mark as corrected" button.


The Yandex. Webmaster service is used in a similar way. For the analysis, perform the following actions:

  1. On the main page, select the "Add site" option.
  2. In the line that appears, enter the URL of the resource.
  3. After adding, in the left-field, select the line "Site indexing " from the menu (Indexing a site by Yandex can take several weeks, the method is suitable if the site has already been added and you need to find 404 errors).
  4. Select the "Excluded pages" option from the drop-down list.
  5. The analysis results are placed below as a list of nonexistent pages.

Xenu's Link Sleuth

In addition to popular online services, it is possible to check the site for broken links using programs. For this purpose, use the free program Xenu's Link Sleuth. Along with broken links, Xenu finds pages on which such links are preserved. The procedure is as follows:

  1. Select the "File" button on the menu bar.
  2. In the list that opens, click "Check URL".
  3. In the top line of the window that appears, enter the domain.
  4. When the site has been crawled, the URLs of pages with an error and the status "not found" are highlighted in red in the results.
  5. To find out where links to not found pages are located, highlight red links, right-click on them and select the "URL properties" operation.

After you have found 404 errors, you need to eliminate them. To do this, you should either correct the broken links (in case of a typo) or set up redirects (if the page was moved to a different address).

Impact of 404 errors on SEO

It is important to understand that broken links that direct you to a 404 error page have a bad effect on a site's ranking in Yandex and Google. In the process of reorganizing the structure of a web resource or deleting documents that have lost their relevance, it is important to take into account the moment that the pages containing them were previously indexed by search robots. It is highly likely that in the future the machine will return a non-existent page as a result of a search query.

It is necessary for such errors to have the correct "404" header code in the HTTP page status response. Search engines, following links, first of all, analyze the code. Wrong response header reflects badly on-site promotion.

Smoothing the negative from the 404 error to the visitor - decorating the page with pictures, links

Along with this, we must not forget about the reaction of the user, who, instead of a page with the necessary information, receives an empty document with a 404 error message. Here it is necessary to induce the visitor to stay on the site and direct actions in the right direction. For this, attention is paid to:

  • page design in the style of the site;
  • the presence of navigation elements that will help navigate and redirect the visitor;
  • availability of a list of popular pages of the resource.

This approach - a thoughtfully designed page with tips - will help keep the visitor on the site, and not leave once and for all in search of the necessary information on other resources.

The design of this page requires a responsible approach, as well as the design of the main page, contacts and other useful information. It should not look primitive and stand out from the style of the site:

  • If the design of the resource is strict, the 404 error page should also reflect the main concept of the site;
  • for entertainment sites, original attention-grabbing pictures, multimedia elements, Flash-animation are used - here it is appropriate to use humour.

To prevent the visitor from closing the page immediately, the visitor is distracted with visual effects, interactive components are added to make the user interested. Creative ideas for page design will help neutralize a dramatically negative user experience, turning frustration with a mistake into a pleasant surprise. However, it is recommended to avoid overloaded heavyweight pages - they should load at an acceptable speed.

It is important to leave a good impression after encountering an error and establish a dialogue with a potential client, a user of the site's services, a buyer. As a rule, a visitor leaves a resource if a 404 error makes him confused and does not know how to proceed.

You can turn this incident in favour if the page is made practical and useful. To direct the visitor in the right direction, use the following techniques:

  1. In addition to the standard message that the page was not found, they make a benevolent appeal to users that the entered address was typed with an error, and advise to double-check the URL. In addition, the user will find the necessary information using the search or returning to the home page of the site.
  2. The necessary navigation elements are left on the page with the error message: the main menu, sidebar, footer, search field.
  3. Leave links to popular pages or recent site entries with an offer to familiarize yourself with them.
  4. It is useful to give the visitor a chance to report a bug or a broken link with the click of a button. This will help the webmaster to improve the site, and will make the user feel that his opinion is appreciated, and the action is useful for the resource.
  5. Among other things, coordinates for feedback are placed here.

CMS WordPress and 404 Error

Error 404 is a common problem that occurs among inexperienced WordPress CMS users. More often than not, access to the admin panel is not limited, the main page is loaded, but when clicking on the links to subpages, a 404 error message appears. This happens when the Htaccess file is deleted or the rewrite rules are not working correctly. To fix the situation, update the permalink settings.

Other reasons for the 404 error message are:

  • changing the structure of links;
  • renaming pages;
  • broken links.

They occur when a previously existing page is deleted, but the link to it remains on third-party sites. You can check for dead links of a resource on the WordPress engine using the Broken Link Checker plugin. To do this, the plugin is installed on the site. The program needs to be activated. After that, in the console under the "Tools" button, the "Invalid links" option appears in the list. The page status is indicated in the "Status" column.

CMS Joomla and Error 404

CMS Joomla has created a separate page for reporting error 404, the design of which is the same in all templates. Therefore, you will need to take time to fit the design into the overall look of the site, add navigation elements to the main menu. For this:

  1. Go to the administrative panel.
  2. Create a new material with a suitable name. The logical choice would be "Error 404. Page not found."
  3. In the material, they write a message to the user explaining the causes of the error and recommendations on what to do.
  4. If desired, leave links to other sections or the search line.

Joomla versions differ in subtleties in the page settings:

  • in Joomla 2.5, 3.0 in the settings of the material from the list under the button "Category" select the option "Uncategorised" ;
  • in version Joomla 1.5 in the list "Section" and "Category" from the drop-down list select "Not Specifi
57,980 points
11 5 5