Everyone knows that if it is an old website that has been in operation for many years, if the domain name is changed, it will bring a lot of losses to our website. For example, the website traffic is gone, the website weight is gone, and the website keyword ranking is gone. Naturally, this website will also lose its domain name. You can no longer bring customers to yourself, so everyone does not agree with the website changing the domain name at will. But what should you do if one day you have to change the website domain name for various reasons? You have no choice but to completely abandon the original website. Or should we think of ways to see if there are any remedial measures that can recover some losses?
Of course, we should think of a way, and of course there are ways to think of it. Although this method cannot guarantee that it can make up for 100% of the losses, it is much better than completely abandoning the original website and doing nothing. So what specific remedial measures should be taken? What about dragging?
Step 1: Back up all the information of the old website, including website source code, website database, etc.
Step 2: Purchase a new virtual host, then upload the source code of the old website and restore the database
Step 3: Point the newly purchased domain name to the newly purchased virtual host
Note that the directory structure of the documents uploaded in the first three steps must be consistent with the original old website and do not change it.
Step 4: Modify the default document in the root directory of the original virtual host, which is the homepage of the original old website, such as index.html or Default.asp, and perform a 301 redirect on this default document. How to do a 301 redirect specifically? Orientation. Here we only take the ASP website as an example to explain how to handle redirection. Open the default document, delete all the code before the recognized document and add the 301 redirection code. Note that the default document must be an ASP document, not a static one. , such as index.html, static documents cannot be processed with 301 redirection. The specific redirection code is as follows:
The following is the quoted content:
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location",http://www.your new domain name/
%>
So why do we need to do 301 redirect processing? The reasons are as follows:
1: You can jump directly to the new domain name as soon as you open the website of the old domain name.
2: Tell search engines that the domain name has been changed, which is more friendly to search engines.
3: Transfer website weight. Part of the original website weight can be transferred through domain name jump.
Step 5: Perform 301 redirection on all other column pages, including the ASP documents on the content page. Then how to perform 301 redirection on the column page? Here we also take the document aboutus.asp in a column of the ASP website as an example.
1: Delete the original code below aboutus.asp,
2: Add the following code
The following is the quoted content:
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location",http://www.yournewdomainname/aboutus.asp
%>
If your website originally has a static function and the search engine includes all your static pages, what should you do? Here is a static page named 1.html saved in the root directory as an example.
1: Also retain the static pages of the original old website
2: Delete the content in each static page (note that you are deleting the content in the static page rather than deleting the static page)
3: Add the following code to each static: (Here it is assumed that there is such a static document 1.html under the root directory of the website
The following is the quoted content:
<meta http-equiv="refresh" content="0;URL=http://www.yournewdomain/1.html">
However, if you have a lot of static pages, it will be more troublesome to modify one page at a time. However, in order to better handle the handover of the old and new domain names, ensure that the traffic is not lost too much, ensure that the weight can be transferred smoothly, and the new website can be guaranteed. If the ranking can be as high as before, then you have to do it no matter how troublesome it is. Of course, if there are tens of thousands, you can try to do it through batch replacement. But I believe that after completing the above steps, I will give you If you add one or two fresh, high-quality original articles to your new website every day, you won’t have to wait long, no more than a month at most, for your new website to regain the traffic, weight and ranking of the original old website.
The personal space of the author Wangchao.com