Three ways to implement 301 jump / 301 redirection (whether the domain name with WWW jump)

Method 1: Host Console Set 301 Jump / 301 Redirect Method 2: Website Root Catalog. Htaccess File Setting 301 Jump / 301 Redirection Method 3: How do I use the WordPress to set up a website? content

301 Jump is also called 301 redirection, and the page is permanently removed, which is an “automatic steering” technology. 301 Jump on SEO optimization is very advantageous. This article focuses on the 301 jump / 301 redirection with WWW and the WWW domain name.

With WWW and do not bring WWW, this is the same for the user, the content seen is the same; but for search engines, it is two different URLs, which will make search hos Which is the main thing in clear URL. We also cannot determine if the user has a WWW when entering the URL in the address bar, so it is necessary to do 301 jump / 301 redirects.

Here are three solutions for your reference.

Method 1: Host Console Set 301 Jump / 301 Redirection

Take a multi-network virtual host as an example.

Step 1: Log in to the host management control page

Step 2: Domain Name Management – Binding Domain Name

This feature can only be used by the domain name of the parsing state, the file has been filed and the network is available, and it is important to note that the target domain name cannot be the same as the source domain name.

Step 3: Base Environment Settings – 301 Redirection

The relationship between the source domain name and the target domain name is: Jump the source domain name to the target domain name.

Method 2: Website root directory. HTACcess file setting 301 jump / 301 redirection

What is the .htaccess file? Set with Filezilla software as an example:

1. The 301 jump / 301 redirection will not take the WWW domain name to the WWW domain name

Add the following code to the .htaccess file under the website root directory, the code is as follows:

RewriteEngine OnRewritecond% {http_host}! ^ Example.com $ [nc] REWRITERULE ^ (. *) $ Http://www.example.com/$1 [l, r = 301]

Example.com will automatically jump to www.example.com, please replace it with your domain name.

2. Redirect 301 jump / 301 redirection to the WWW domain name

Add the following code to the .htaccess file under the website root directory, the code is as follows:

RewriteEngine OnRewritecond% {http_host}! ^ Www.example.com $ [nc] Rewriterule ^ (. *) $ Http://example.com/$1 [l, r = 301]

Www.example.com will automatically jump to eXample.com, please replace it with your URL.

However, if you don’t know the code, May is still not recommended to modify the code in the .htaccess file, in case the error, the entire host cannot be used normally, then it will not pay.

Method 3: Use WordPress to build a website

Keeping the WordPress address (URL) is consistent with the site address, and can implement 301 jump / 301 redirection, otherwise the website will not open

Procedure: WordPress – Settings – General – WordPress Address (URL) is consistent with site addresses.

These three methods are optionally available to the 301 jump / 301 redirection.

How to check if there is no success?

Method 1: Enter the source domain name in the browser address bar

See if you can successfully jump to the target domain name. If you successfully jump, then congratulations to success!

Method 2: Test HTTP status in webmaster tools

Note: Be sure to enter the query is the source domain name.

Three implementations of 301 jump / 301 redirection and how to verify successful jump, if you have a better way or have any questions, please leave a message below.