301 the function and usage of permanent redirect to search engine optimization

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

For most of the webmaster will face a very common problem, that is the search engine included the site's first level domain name, two domain name, or even level three domain name. This situation is very serious, on the one hand reflects the search engine crawl your site is very blind, it does not know from which domain name entrance to the site to crawl the page. On the other hand also warned us that it is time to do 301 Redirect, we see so unfamiliar and familiar with the words may think it will be difficult to do, the following we have a little analysis.

301 definition and Function of redirect:

Definition: When a user or search engine sends a browse request to a Web server, one of the status codes in the header (header) of the HTTP data stream returned by the server means that the page is permanently transferred to another address.

Role: Note that a word "permanent" is used in this area, it means to tell the search engine that this redirect is permanent, and that it's 302 redirect (temporary) that distinguishes it, which in our view is a trivial code, but for search engines it's about the future of your site. If you want to make the Site 301 permanent Redirect, but you have made 302 temporary redirect, then the search engine will continue to follow the usual way to the site included, not to the site of other domain names to take shielding and other measures. So your site will still exist in these multiple domain names. 301 redirect is to inform the search engine no matter which domain name or address will be permanently transferred to Shijiazhuang to do securities under this domain name, then search engine (Baidu reflects relatively slow) will quickly change your domain name to a unified redirect domain name, so redirect to the site visitors experience the same, For search engines 301 and 302 experience and results are very different.

Summary: 301 redirect can make your website unified weight, avoid unnecessary weight dispersed and waste the optimization of time and experience, originally 100 of the efforts by several domain name split up only 50 or less weight.

301 use and usage of redirects:

Use: In fact for most sites need to make 301 redirects, for site visitors can let everyone just remember the same domain name unified everyone's memory, for search engines can let search engines only include the same domain name Unified site weight, so that site visitors through the unified domain name to enter the site. In other words, it is used to enhance the user experience and the friendliness of the search engine.

Usage: Since is redirects and is the JSP class website redirection, the code certainly is distinguishes with other type website, below we carry on the actual combat operation:

1, the establishment of 301 redirect files, using Notepad to create a file named 301.jsp file, in which enter the following code and Save:

-------------------------------does not include this row------------------------------------

<%
Response.setstatus (301);
Response.setheader ("Location", "Your domain name");
Response.setheader ("Connection", "close");
%>

-------------------------------does not include this row------------------------------------

Note: Please change the domain name in the above code to your primary domain name URL, otherwise it will be redirected to another website.

2, upload files to the site space root directory, you can use the FTP tool upload.

3, the uploaded 301.jsp file as the default home page, you can go to the Web Site Control Panel settings, directly in the "Modify the default first page" text box in the front of the first input 301.jsp can be.

4, check the success of redirection, try to enter a different domain name, if these several domain names are redirected to the domain name you set up to explain the success of redirection. If you do not succeed, you need to check the settings code and the default home page settings.

Summary: 301 redirect for search engine optimization is more advantages than disadvantages, but if your site revision or change the site domain name, but also must take into account the 301 redirect factors. If the site change the domain name also need to change the corresponding redirect file, you can visit www.tjbz99.com/more articles, copyright reproduced please specify.

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.