MENU service case
 Website construction website design Beijing website construction high-end website production company Shangpin China
We create by embracing change
360 ° brand value__
simplified Chinese character
Simplified Chinese English

Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction

Type: Shangpin Dynamic Learn more

How to do 301 redirection for SEO website optimization

Source: Shangpin China | Type: website encyclopedia | Time: 2012-12-04

How to do 301 redirection for SEO website optimization

301 Redirect Many people do not understand it or know how to use it, which leads to confusion in the use of domain names and is not conducive to search engine optimization. Next, let's talk about 301 redirection.

What does 301 redirect mean?

In the address bar, enter:

For example, in Hongtao's blog, the domain name ihucc.com can be seen to automatically jump to ihucc.com. This effect is 301 redirection.

But not all High end website construction The virtual hosts of all support such operations. The conditions for such operations are:

1. The Linux virtual host Apache server needs to support the. htaccess file. (Check with the host vendor for support) If so, first resolve the two domain names to the same IP address, and then add the following rules at the beginning of the. htaccess file:

code:

RewriteCond %{http_host} ^AAA.com [NC]

RewriteRule ^(.*)$ //www.AAA.com/ $1 [R=301.L]

It should be noted that the. htaccess file can't be modified directly when it is transferred to the local. We can edit it by modifying it to. htaccess. txt. After writing the code to be written, directly transfer. htaccess. txt to the space, and then directly change. htaccess. txt to. htaccess file name by FTP. This will improve the efficiency!

2. The ISAPI_Rewrite component must be installed on the IIS server of the virtual host of the window. (Check with the host vendor for support) If so, first resolve the two domain names to the same IP address, and then add the following rules at the beginning of the httpd.ini file:

code:

RewriteCond Host:^AAA.com$

RewriteRule (.*) //www.AAA.com $1 [R,I]

If the above code is not feasible, please try this code:

code:

[ISAPI_Rewrite]


CacheClockRate 3600

RepeatLimit 32

RewriteCond Host: ^hongtaoseo.com$

RewriteRule (.*) //www.hongtaoseo.com $1 [I,RP]

Most virtual hosts do not support such operations. What should we do now?

The above 301 redirection operation mode is not necessary. If the host does not support it, the following methods can also achieve the same effect.

1. If the domain name and website are brand new, that is, the domain name without www has not been included for the time being, the domain name without www can be used to forward to the domain name with www. Forwarding is set in the background of domain name management, and some domestic domain name vendors are also not allowed to forward.

2. If the website has existed for a period of time and the domain name without www has also been included in many pages, the domain name with www and without www will be used to resolve to the website's IP at the same time. Then, the website's main navigation, classification, or secondary navigation and other important locations should use the absolute address with www as far as possible.

Related questions?

1. Why do you want to transfer domain names without www to those with www through 301 or other methods?

This is mainly for the purpose of URL standardization, so that the weight of the website is concentrated on a certain domain name, rather than scattered.

2. Can I 301 a domain name with www to a domain name without www?

If you find that domain names without www rank better or have a lot of content, you can transfer the domain name with www to the domain name without www.

The reason why we suggest that the 301 without www be transferred to the 301 with www is mainly because of the Chinese habit of using domain names.

3. Domain names without www will not be resolved or forwarded, OK?

Because many people may enter domain names without www when visiting your website, it is recommended to bind them.

4. Is it necessary to also 301 index.html or index.php to the main domain name?

This is unnecessary. Because the purpose of 301 is to concentrate weight, as long as Beijing website production The main domain name is used as the address, that is, the URL without index is used as the anchor text, which can realize the function of centralized weight. When all links do not have an index, users and search engines will not access the URL with an index.

Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).
TAG label:

What if your website can increase the number of conversions and improve customer satisfaction?

Make an appointment with a professional consultant to communicate!

* Shangpin professional consultant will contact you as soon as possible

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]

Communicate with professional consultants now!

  • National Service Hotline

    400-700-4979

  • Beijing Service Hotline

    010-60259772

Please be assured to fill in the information protection
Online consultation

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]