The default error page of IIS is very unfriendly. When many people see the default error page, they will say: The website cannot be opened! This part of the traffic is lost in vain. And if the error page jumps directly to the homepage and it is very unfriendly to search engines, the homepage may even be blocked. So depending on the situation, there are two ways to solve this problem: Related wonderful articles are very humane! Thunder 5.9 Intelligent File Management Function, Green Dam Function, 6 Major Failures of Netizens, 10-Day Trial Summary. If it is a content-based website such as a blog, you can return a search box with a 404 error for visitors to search. If it is an e-commerce website, you can return a Progress bar with 404 error to jump. These two methods take care of both visitors and SEO. You can check how many error pages your website has in Google webmaster tools.
The method to modify the default error page is very simple: right-click the website you want to manage in IIS, and set 404 as the corresponding error page in Custom Error. There are two ways here:
1. If you select "File" for "Message Type", you can only use files ending in .html or htm, otherwise the code will appear when the user accesses the error page. For the error page set in this way, although the 404 status is not output in the .html file, IIS will automatically output the 404 status after execution.
2. If you select "URL" for "Message Type", you must use an asp file (because the 404 status can only be set in an asp file), otherwise the 200 status code will be returned when accessing the error page. Also add in the asp file: <%Response.Status = "404 Not Found" %> If you want to jump to the homepage regularly, there are two methods:
1. Use the refresh of the meta tag to jump to meta http-equiv="refresh" content="3;url=http://www.downcodes.com">
According to the Google Chinese blog administrator, this method is used by Yahoo Make a jump.
2. Use js to jump setTimeout("testTime()",2500); function testTime() { location = "http://www.downcodes.com/"; }
I feel that using js is better, because the meta tag jump is worried that search engines will recognize it as "200" or "302". See this paragraph here:
It is often seen that the customized 404 error pages of many websites take a form similar to this: first display an error message, and then, through Meta
Refresh will jump the page to the website homepage, web map or other similar pages. Depending on the specific implementation method, this type of 404 page may return a "200" status code or a "302 temporary redirect", but no matter which one, it is not a suitable choice from an SEO technical perspective.
We have already talked about the "200" status situation above. So, when the 404 page returns "302", how will the search engine treat it? Theoretically, for "302" errors, search engines believe that the web page exists, but the address has been temporarily changed, and the page will still be indexed. In this way, repeated text similar to the "200" status code will also appear. Problem; Secondly, mainstream search engines represented by Google have increasingly strict requirements on the scope of application of 302 redirects. There is a great risk in this type of improper use of 302 redirects.