Intermediary transaction SEO diagnosis Taobao guest Cloud host technology Hall
Redirection is simply to redirect various network requests to another location in a variety of ways.
such as: redirection in Web pages
Redirection of domain names
The change of routing is also a redirect to the data message via the path
In our website construction, we often encounter the need for Web page redirection: Like the site adjustment, such as changing the directory structure of the Web page, the page was moved to a new address, or the extension of the page name, If the application needs to put. PHP is changed to. html or. shtml, in which case, if not redirected, the user's favorites or the old address in the search engine database will only give access to a 404-page error message, and the access traffic is lost; and some sites that are registered with multiple domain names, You also need to redirect users who access these domain names to the main site automatically, and so on.
Common redirection methods are: Redirect, 302 redirect and Meta Fresh:
The redirect:301 represents permanent transfer (permanently moved), 301 redirects are the best way to search engine friendliness after a Web page change, and it is recommended that 301来 be used as a referral if it is not temporarily removed.
302 redirect:302 on behalf of temporary transfer (temporarily moved), in the previous years, many black Hat seo has been widely used in this technology cheating, at present, major search engines have intensified the crackdown, Like Google's previous years of business.com and recent penalties for BMW's German website. Even if the site is not objectively spam, it is easy to be mistaken for the search engine spam and be punished.
Meta Fresh: This was more prevalent 2000 years ago, but it is now rare. It is specifically through the meta instructions in the Web page, after a specific time to redirect to the new page, if the delay time is too short (about 5 seconds), will be judged as spam.
redirect realizes web redirection
IIS Server implements 301 redirect
* Open Internet Information Services Manager, right-click on the page or directory you want to redirect
* Select Redirect to URL
* Enter the URL address of the destination page to jump to in the redirect to input box
* Select Permanent redirect for resources (remember)
* Finally click "Apply"
Apache Server implements 301 redirect
In contrast, Apache is much simpler to implement than IIS. In Apache, there is a very important file. htaccess, with its settings, can achieve a lot of powerful features, 301 redirect is just one of them.
Redirect permanent/http://www.cfan365.cn/(redirect content from directory to http://www.cfan365.cn/)
REDIRECT permanent/index.php http://www.cfan365.cn/index.php?go=category_6 (redirect page index.php to http://www.cfan365.cn /index.php?go=category_6)
A more complex match can be achieved by reasonably configuring regular expressions in the redirection parameters. Interested friends can refer to this site Apache manual.
PHP 301 Redirect
Header ("http/1.1 moved Permanently");
Header ("location:http://www.cfan365.cn");
?
301 redirects under ASP
<%@ Language=vbscript%>
<%
Response.status= "Moved Permanently"
Response.AddHeader "Location", "http://www.cfan365.cn"
%>
ASP. NET 301 Redirect
301 redirects under ColdFusion
<.cfheader statuscode= "statustext=" Moved Permanently >
<.cfheader name= "Location" value= "http://www.cfan365.cn" >
Old domain name redirected to new domain
Create a. htaccess file and write the code provided below to the file to ensure that all directories or pages of the old domain name are correctly jumped to the new domain.
Remember that. htaccess files must be placed in the root directory of the old site, and the new site will keep the same directory structure and Web files as the old site
Options +followsymlinks
Rewriteengine on
Rewriterule (. *) http://www.cfan365.cn/[r=301,l]
Please change the above www.cfan365.cn to the domain name you want to jump to.
In addition, I suggest you aggregation the old site's external links, and contact the corresponding site to modify the import chain URL to point to the new site.
Note: the. htaccess file only works on a Linux host that uses Apache with the MoD rewrite module as a Web server
Domain 301 Redirect to www level two domain name
In previous articles I have repeatedly mentioned: www.cfan365.cn is a cfan365.cn domain two domain name, and the level two domain name and a directory between the selection and site structure optimization done a detailed analysis, interested can read two articles, website structure optimization is the most important SEO.
OK, continue to the domain 301 to the WWW two level domain implementation:
Create a. htaccess file and write the code provided below to the file to ensure that all requests from cfan365.cn are directed to the www.cfan365.cn request. Remember that. htaccess files must be placed in the root directory of the old site, and the new site will keep the same directory structure and Web files as the old site
Options +followsymlinks
Rewriteengine on
Rewritecond% ^cfan365.cn [NC]
Rewriterule ^ (. *) $ http://www.cfan365.cn/[R=301,NC]
Please change the above cfan365.cn and www.cfan365.cn to the domain name you want to jump to.
Note: the. htaccess file only works on a Linux host that uses Apache with the MoD rewrite module as a Web server
301 Redirect Detection Tool
After the configuration is complete, be sure to check carefully if it is correct. The internet has many similar Server header checking tools, such as Check Server Headers tool-http Status codes Checker
Website 302 redirect Improper use caused by Google penalty
Business.com is the largest commercial search engine and catalogue on the Internet, renowned for its professional business information, including nearly 190,000 Web pages. If the "business" as the keyword in google search, the site ranked first. However, on September 5, Business.com encountered a strange thing: its home page from PR8 into a PR0, and Google search results can not find the home page. Fortunately the "evaporation" is only the home page, but fortunately the next day the home page returned to Google's search results, but the PR is still 0.
The problem with business.com is the redirection command. The site lets business.com jump to www.business.com, a redirect that should be permanent. We know that 301 is a permanent redirect, and 302 is a temporary redirect that can only be used if a Web site or Web page is temporarily moved to another location within 24-48 hours. Business.com, however, mistakenly uses the "http/1.1302 Object moved" status code.
In fact, Web site redirection is very common, such as not satisfied with the original domain name and apply for a new domain name, buy easy to be misspelled the domain name, to prevent customers because of misspelled URLs can not find the site, and so on. However, many people will be "stop the disaster" because of using the wrong redirect status code, just like business.com. While their redirection is justified, if used improperly, Google may be mistaken for using multiple domain names to point to the same site, and your site will be blocked for "using repetitive content to disrupt the site rankings of Google search results." Business.com is the best precedent. But most sites that use error redirection parameters are not business.com so fortunate that a small redirect could undo the site, only from scratch: Reapply for new domain names, republish new sites, and so on. Remember: Google will never sympathize with anyone who makes an inadvertent mistake.
Web server's process of responding to web browsing requests
Let's take a look at the interaction process between the user/search engine and the site first. When a user or search engine issues a web browsing request to a Web server, the server:
1. Convert the domain name to the IP address of the Web site through the Domain name server (DNS) and return it to the customer
2. Open an IP set interface connection
3. Write down an HTTP stream of data through this set of interfaces
4. Receives an HTTP data stream from the Web server that responds to the request. The data stream contains the status code, and the value of the status code is determined by the HTTP protocol. The "HTTP Data Flow" message is also called header information. The header information includes a date, a server type, and usually a "OK" message. If all is well, the Web server sends the "OK" message and the request page. If the site has been redirected at this time, the server will include a response information such as "302 moved temporarily" or "moved permanent" in the header information. The search engine will make a decision based on the contents of the server header information.
Site redirection Considerations
1. If you are ready to move the files on the server to other places, you must correctly notify the search engine crawling procedures for the following information:
-Destination Address: Where these files were moved
-Move properties: temporarily removed or permanently removed
2. For sites with multiple domain names, experts suggest that the domain name that you do not want to promote on the search engine should be permanently redirected with a 301 jump command.
Ensure that the Web site implements the correct 301 redirect
For the correct implementation of the 301 redirect, there are several methods available for your reference:
1. Add 301 redirect instructions in the. htaccess file
2. Applies to users using UNIX network servers. Notify search engine via this instruction spider your site file is not under this address. This is a more common approach. Form: Redirect 301/http://www.cfan365.cn/
3. Complete the 301 redirect in the system administrator configuration area of the server software
For users who use the window network server
4. The use of "mod_rewrite" technology
Changes made through this technology will be reflected in the. htaccess file, shaped like this:
Options +followsymlinks
Rewriteengine on
Rewritecond% ^cfan365.cn
Rewriterule ^ (. *) $ http://www.cfan365.cn/[r=permanent,l]
5. Binding/local DNS (domain alias jump)
If you have permission to edit the local DNS records, you can resolve the problem by simply adding a record.
If you do not have this permission, you can require the Web site hosting service to set up the DNS server accordingly.
DNS Server settings
To point aaa.cfan365.cn to www.cfan365.cn, you need to add an alias record to the DNS service, written as: AAA in CNAME www.cfan365.cn.
If you need to configure a large number of virtual domain names, you can write: * in CNAME www.cfan365.cn.
This redirects all cfan365.cn records that have not been set to the end of the www.cfan365.cn.
6. Implement 301 redirects with asp/php:
The code has been described above.
Comments and suggestions from senior SEO expert dan Thies
Dan Thies had a deep understanding of business.com's problems because he had a similar experience. His website has a member tracking script, where a member's site is mapped to this tracking script through 302 commands, and this tracking script is mapped to his homepage via 302. When Google uses "keyword research" to search, his homepage is ranked in the top ten, but the address shows the member's Web site. The results make him laugh and cry: The visitor enters his website through Google search results, but he has to pay for the amount of the visit to that member! Later, he used robots.txt file to prohibit spiders tracking access to his member tracking script to solve the problem.
For Business.com,dan Thies, "There are still some problems with Google's 302 redirect", but that does not mean that Google does not allow 302 redirects. Business.com have not been blocked or punished, they simply returned the wrong response. ”
Dan Thies recommends that if you use a tracking displaymappings script and you have to redirect the visitor to a landing page, you must prohibit spiders from accessing the second redirect in the robots.txt file. If you do not redirect the tracking Displaymappings script, but simply copy the contents of the other URL, you should prevent the spiders from accessing the trace URL in the robots.txt file in case the search engine is penalized for duplication of content.
301 on the experience of redirect
A multi-domain site Master's experience:
"I have only one site, the main domain name is www.cfan365.cn, in addition to such as Domain1.com, domain2.com, domain3.com and so on a total of more than 10 domain names." All of these subordinate domain names are mapped to www.cfan365.cn, and all domain names correspond to the same IP address. Because in fact I only have one site, one site can only correspond to a. htaccess file, it is obviously impossible to directly modify the. htaccess file to achieve redirection. I used the following steps:
A. Separate the domain1.com from the cfan365.cn and make it an ordinary independent web site on the server.
B. Create a. htaccess text file for domain1.com and set the redirection code in the file to:
Redirect permanent/http://www.cfan365.cn/
The modified. htaccess file is then passed to the domain1.com server.
This step can also be done in the Domain name Control Panel.
C. Go to the Domain name Control Panel, release all domain names originally bound to cfan365.cn from cfan365.cn, and then rebind to doamin1.com. As a result, these bound domain names use domain1.com. htaccess files, which means they are permanently redirected to the cfan365.cn. All right, that's it! It's so easy!