ASP. NET Configuration Error page analysis

Source: Internet
Author: User
Keywords existence analysis search engine
Tags .url analysis asp aspx browse the web browser code configuration

ASP. NET Configuration error page may face many problems during the operation of the Web site, such as server error, user requested page does not exist, program configuration error and so on a series of problems. When a user requests to browse the Web, there will be some system default error pages, which is unfriendly to the user and is unfriendly to the search engine.

Here we know some SEO common HTTP status code:

404: The server could not find the specified resource, the requested page does not exist (for example, the browser requested the page was deleted or moved, but does not exclude the possibility of future links valid);

410: The requested Web page does not exist (note: 410 means permanent, and 404 means temporary);

Server successfully returned the requested Web page;

The permanent site redirect

302: Website Temporary redirect

The main thing in the search engine seems to be the 404 error, 404 error is to represent the Web page does not exist. When the user enters your domain name the next nonexistent page produces this error, the search engine thinks HTTP error, the page does not exist, if too many such errors will be punished by the search engine.

ASP. NET Configuration Error page solution:

You can set up 404 pages at IIS.

But. NET has this better practice, in Web.config's system.web inside only need to add

CustomErrors defaultredirect= "404.aspx" mode= "on"
Error statuscode= "404" redirect= "404.aspx"/
/customerrors

You can write that in asp.net3.5.

CustomErrors defaultredirect= "404.aspx" redirectmode= "Responserewrite" mode= "on"
Error statuscode= "404" redirect= "404.aspx"/
/customerrors

If the Redirectmode property is set to Responseredirect, the user is redirected to the error page, and the original URL is changed to the URL of the error page. If the Redirectmode property is set to Responserewrite, the user is directed to the error page without changing the original URL in the browser.

This allows you to customize your own asp.net configuration error page.

ASP. NET Configuration error page to introduce you here, I hope by introducing you to understand the ASP.net configuration error page of the specific operation.

Related Article

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.