What is the 404 page and how to correctly set the 404 page

Source: Internet
Author: User
What is the 404 page?

404 a webpage is displayed when a user attempts to access a webpage that does not exist on the website (because the user clicks a damaged link, the webpage has been deleted, or the user has entered an incorrect URL. Called 404
The web page is returned because the network server returns the 404 http status code for the request for a lost web page, indicating that the web page is not found.
404 The purpose of the page is to tell the viewer that the requested page does not exist or the link is incorrect. At the same time, the user is guided to use other pages of the website instead of closing the window and leaving.

  404 impact on Seo optimization by search engines

The search engine uses HTTP status codes to identify the status of webpages. When a search engine returns a dead link, the website should return a 404 status code, telling the search engine to discard the index of the link.
Custom 404 error pages are a good way to enhance user experience, but the impact on search engines is often not noticed during the application process. For example: incorrect server configuration causes "200" status code or custom 404 error page to use Meta
Refresh causes "302" status code to be returned. The search engine creates an index for the link, which leads to a large number of different links pointing to the same webpage content. As a result, the search engine significantly reduced its trust in the website.

Custom 404 error pages correctly set can provide user experience, improve website PV, reduce website traffic loss, reduce dead links, and improve search engine trust in websites. Therefore, the 400 page setting is also an important part of Seo optimization.

How can I correctly set the 404 page?

1. Set the 404 error page in Apache (generally a Linux host)

Setting the 404 error page for Apache server is simple. You only need:
In. Add code to the htaccess file: errordocument
404/error.html,
Create a simple html404 page named error.html,
Set
Error.html is placed in the root directory of the website.

2. IIS /. . Net

First, modify the application root directory settings to open web. config
Edit the file and add the following content to it:
Reference content is as follows:
<Configuration>
<System. Web>
<Customerrors
Mode = on defaultredirect = Error. asp>
<Error statuscode = 404 ″
Redirect = notfound. asp
/>
</Customerrors>
</System. Web>
</Configuration>
Note: In the preceding example, error. asp is the default 404 page, and notfound. asp is the custom 404 page. Modify the file name when using it.
Then, add the following to the custom 404 page notfound. asp:
Reference content is as follows:
<% Response. Status =
404 Not found %>
In this way, IIS can correctly return the 404 status code.

  404 concepts of page creation
Provides concise problem descriptions to eliminate visitor frustration.
Provide reasonable solutions to help visitors complete access targets.
Provides a personalized and user-friendly interface to Improve the access experience.

  Google released 404 page Tool

Google added an "enhanced 404 page" tool to its website administrator tool. After logging on to the Google website administrator, click "Tools"-"enhanced 404"
Page to get the relevant code. The 404 page tool provided by Google provides a Smart Search box and the most relevant link address when a page error occurs. This tool provides JavaScript-based Web pages. When a 404 error occurs, Google will list a content on the web page and other addresses most relevant to the "missing" web page, and provides a Google-based intra-site search box.

Broaden the summary of 404 page settings

1. Do not redirect the 404 error to the website homepage. Otherwise, the homepage may disappear in the search engine.
2. Do not use absolute URL. If you use absolute URL, the returned status code is 302 + 200.
3.404 check whether the page settings are correct. However, the HTTP header must return the 404 status. This is mainly related to the search engine, because if your website generates many pages but the search engine sees many normal pages, it may be considered cheated by mistake.
4.404 do not jump to the page automatically. Let the user decide the destination. This involves the creation of 404 pages, and it is very important to provide a user experience. 404 page production is very knowledgeable.

 

404 The page file size must be greater than 512

 

Personal Website: Fractal art network

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.