Asp. NET in the jump 200, 301, 302 to implement code _ practical skills

Source: Internet
Author: User
The status code of the HTTP at the time of the jump is generally one of 200,301,302, the following lists the status code occurrence, and then explain the different status code what is the difference:

Jump for status Code 200:
1. <meta http-equiv= "Refresh" content= "3; Url=default.aspx "/>
2. Server.Transfer ("default.aspx");
3. urlrewrite--strictly speaking, this is not a jump, just a url "cheat"
4. <a>--do not know I put this label also listed as a jump will no one have the opinion

Jump to Status 302:
Response.Redirect ("default.aspx");

State 301 and The Jump: Response.Status = "Moved Permanently";
Response.AddHeader ("Location", "Http://www.cnblogs.com/dingxue");

For users, each jump is not a lot of difference, can achieve the goal. But for SEO, these are very far, State 200 third use appropriate SEO has great benefits, but state 200 of the first and state 302 but basically no benefit, and then unfortunately, 302 jump was used to full street.

A long time ago, when the search engine was also very silly, many people use meta-refresh to obtain a powerful SEO effect, and then directly by the search engine to kill. And then a lot of people started using 302 as a springboard, and then they were killed, like the two famous cases: Business.com and BMW. Cheating search engines, the consequences are serious. So now very few people in the jump to do SEO, but some inevitable jump or to continue to exist, how to prevent these jumps to play a negative impact? So someone studied the 301 jump.

Forgetting to sweep the blind for some of the entry-level brothers, three status codes are explained as follows:
200 normal state, nothing happened, normal page browsing is generally 200
301 Permanent transfer (permanently moved), SEO must use the moves, will be the old page of the PR and other information transferred to the new page
302 Temporary transfer (temporarily moved), very commonly used moves, is also the most easily found in SEO cheating way
By the way, that 404, many sites in error will have a custom error page, but unfortunately there are many people forget this status code, directly to make a mistake page is generally still 200, search engines will include this page, but a lot of different URL 404 jump to this page, will be considered a large number of duplicate pages, the most miserable is 404 too many, is considered to be invalid in the station, repeated content too much, so make a custom error page must remember to return a 404 back.

Depressed, found nothing good to write, to stop it, want to study SEO or similar technology of the brothers below comments, I have not started, the need for everyone to guide, thank you

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.