Just in case, make a 301 permanent redirect to your site.

Source: Internet
Author: User

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

The recent million network of virtual host changed to a separate IP, this makes the network space without binding domain name can directly find the Web site on the server, resulting in some domain name "misunderstanding" to your space IP, this time you can not be happy, because the search engine does not know this space really belong to which domain name ... The so-called "misunderstanding analysis" is no more than two reasons, one is really used in this IP, expired, did not remove the domain name of the resolution, and happened to this independent IP space was you bought. There is a fate ... The second is that someone did it on purpose ... Recently I have encountered n such cases, of course, I met basically belong to the first kind. Because there are too many people in cyberspace, what kind of things can come out------------------------------

What if you get caught up in something like this? The most exasperating is the search engine like a fool, it is included in the "misunderstanding" domain name, and will be your site from the results of the deletion! That is more than dou her niang also injustice ah ...

First let's take a look at what is "301 permanent redirect": 301 represents a permanent transfer (permanently moved), which is used to tell the search engine to be permanently transferred, and is the best way to search engine friendliness. If a foreign domain name dares to resolve the space we are in control of, Then we give it a permanent transfer, to tell the search engine who is the real owner of this site!

So how do you do 301 redirects?

If you are using a virtual host space, 301 redirect is to use code to achieve, so required to do the site page must be dynamic page, if it is a static site, it can not achieve a 301 redirect. If your home page is static, the proposal is temporarily changed to dynamic, such as "index.html" Index.asp ", so that can be achieved. If you are an ASP program, you can use the following code to achieve not only the first page of the 301 redirect, including the site all the pages can redirect the corresponding page ...

<%
If request. ServerVariables ("Http_host") <> "www. your domain name" then
if Request.ServerVariables ("script_name") = "/index.asp" Then
response.status= "moved Permanently"
Response.AddHeader "Location", "www. your domain name"
Else
If Request.ServerVariables ("query_string") <> "" Then
p= "?"
Else
p= "
End If
response.status=" moved Permanently "
Response.AddHeader" Location "," http:// www. Your domain name "&request.servervariables (" Script_name ") &p&request.servervariables (" Query_string ")
Response.End
End If
End If
%>

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.