A 404 error solution is frequently present on the Web server

Source: Internet
Author: User

Browse page on the network error link prompts a variety of, 404notfound is also considered a very common problem, I believe that the Internet family have encountered the situation, when we open a webpage will appear prompt: 404NotFound, see the page mood is bad, 404notfound is mainly used for the browser can not crawl the information inside the page, is to guide readers to continue to browse the site of other pages or do not do anything, this is a good survey of the site experience.
404 Not Found will prompt the user this page file does not exist or has been transferred to other places, reduce the user experience, and user experience ultimately related to the optimization of our site, so stationmaster master 404 related knowledge is very necessary. So what are the causes of this error?
1. The Web service extension lockout policy blocks this request.
2. The Web site cannot be accessed on the requested port.
3. The MIME mapping policy blocks this request.
4, tracking access to various types of foot code or CSS file is invalid but the calling code still exists.
5, a directory directly deleted (resulting in a period of time the directory file is crawling all reported 404 Not Found error)
6, the website updates the revision, but some local plates follow the original module, and the original module called the file has been deleted or transferred the path.
7, Web page URL generation rules change, Web page file renaming or moving location, import links spelling errors, etc., resulting in the original URL address is inaccessible

Although the 404 error page is an error page for user experience to display the role of guide, do not participate in the site rankings. But the wrong use of the 404 page, will also lead to the site is down right, so encountered 404 Not Found error To resolve the problem in a timely manner, so as to avoid the site affected.
So what are the ways to resolve 404 Not Found errors?
1, Apache set 404 error page. The way to set the 404 error page for Apacheserver is simple, just add the following to the. htaccess file, errordocument404/notfound.php.
2, for the existence of the Web content due to the path changes caused by the access, you can define the 404 error in IIS to a dynamic page, in the page using 301 Permanent Redirect to the new address, the server returned 301 status code.
3, the 404 point to a dynamic page, such as error.asp, if not set in the page, just return the hint of the HTML code, will cause the page to return 200 status code, which is not correct, we can display the prompt content, add the statement: Response.Status = "404 Not Found", which ensures that the page returns a 404 status code.
4, set 404 point to a well-designed HTML file, this time the page returns the 404 status code. Now the IDC provider basically provides 404 set of functions, directly upload file settings. To set the method in IIS: Open IIS Manager –> Click the properties of the site to which you want to set the custom 404 –> click the custom error option –> Select the 404 page –> Select and open the Edit Property –> set to fill in Url–>url Err404.html "–> Press OK to exit and then upload the good err404.html page to the site root directory. Here, in message type, be sure to select file or default instead of URL, which will result in a "200" status code being returned.

There are many reasons to produce 404 Not Found page error, when users encounter this problem, to find the cause of the error in time, and then find the corresponding solution according to the problem, so as to avoid a long time will have a bad impact on the site.

√ Data center resources, lowest price, easy maintenance
√ Support to upgrade the number of expansion servers and server configuration at any time, reducing the user's cost
√ 24-hour technical support, ready to solve the problem online

The site server has a recurring 404 error resolution

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.