What is a 301 redirect? It is a transfer process for returning the HTTP status code “301 Moved Permanently”, which indicates a permanent URL change when the old URL is changed to the new URL due to the relocation of the website.
If this 301 redirect goes well, it can take over your SEO reputation.
On the other hand, if you don’t do 301 redirects or make mistakes, it will be difficult for Google to evaluate you.
Specifically, if you do not perform a 301 redirect after changing the URL of the web page, you will not be able to carry over the backlinks attached to the URL before the change to the URL after the change. If that happens, the number of backlinks of the changed URL will decrease and it will be difficult to be evaluated by Google. As a result, your search ranking will drop.
Also, if you set a client-side redirect such as meta refresh or javascript, the status code “200” will be returned, so it will not be a transfer process to return the status code “301 Moved Permanently”, which indicates a permanent URL change. It increases the chances that your SEO rating will not be carried over successfully.
To avoid these bad situations, understand the basics of 301 redirects and set them up properly.
Based on this point, this time, I would like to explain the points that are easy to understand for beginners, focusing on the meaning of 301 redirects, why it is necessary, how to set it, and points to note.
What is a 301 redirect?
What is a 301 redirect? It is a transfer process to return the status code “301 Moved Permanently”, which indicates a permanent URL change when the old URL is changed to the new URL due to the relocation of the website.
For example, since the contents of the web pages “https://infowikiz.com/seo-abc/” and “https://infowikiz.com/seo-edf/” are duplicated, “https://infowikiz.com/seo-edf/” jp/seo-abc/” web page and integrated the contents.
At this time, in order to transfer the SEO evaluation of the URL of “https://infowikiz.com/seo-edf/” to the URL of “https://infowikiz.com/seo-abc/”, a permanent transfer process will be performed. To do.
This process is called a 301 redirect.
Read Also: What are meta keywords?
Difference between 301 and 302 redirects
301 and 302 redirects are the meaning, role, and site URL information displayed in search results are different.
For example, a 301 redirect means a permanent transfer and can carry over the SEO reputation from the source page URL (old URL) to the destination page URL (new URL).
Also, the content indexed in the search results is new and the URLs displayed in the search results are new.
On the other hand, a 302 redirect is a temporary transfer and does not carry over the SEO rating from the source page URL (old URL) to the destination page URL (new URL).
Also, the content indexed in search results is new, but the URLs displayed in search results are still old.
In this way, the meaning, role, and site URL information displayed in search results are significantly different between 301 and 302 redirects.
Why You Need a 301 Redirect
There are several reasons why 301 redirects are necessary.
- Your SEO rating will drop
- because it will be crawled in vain
- Because users can’t automatically transition to a new page
Your SEO rating will drop
The reason why you need a 301 redirect is that it will lower your SEO rating.
For example, let’s say you changed the URL from “https://infowikiz-abc.com” to “https://infowikiz-efg.com” due to a site renewal.
Suppose you didn’t do a 301 redirect at this time.
If that happens, the backlinks and content evaluation of the old URL of “https://infowikiz-abc.com” will not be carried over to the new URL of “https://infowikiz-efg.com”.
In other words, the SEO rating of the new URL will drop.
The lower your SEO rating, the lower your search ranking will be.
As you can see, the SEO rating goes down, which is why you need a 301 redirect.
because it will be crawled in vain
The reason why you need a 301 redirect is that it will be crawled in vain.
For example, since the contents of the page URLs of “https://infowikiz.com/abc” and “https://infowikiz.com/efg” were almost the same and duplicated content, “https://infowikiz.com/ abc” URL with content.
Suppose you didn’t do a 301 redirect at this time.
If that happens, search engines will not be able to tell that the page URL has been permanently changed from “https://infowikiz.com/efg” to “https://infowikiz.com/abc”.
In this case, both page URLs “https://infowikiz.com/efg” and “https://infowikiz.com/abc” will be crawled.
In other words, the page URL of “https://infowikiz.com/efg” will be crawled unnecessarily.
If it is crawled unnecessarily, crawl resources will be wasted and other important pages will not be crawled, or the page URL of “https://infowikiz.com/abc” will be recognized as duplicate content.
In this way, it is crawled unnecessarily, so a 301 redirect is necessary.
Because users can’t automatically transition to a new page
The reason why you need a 301 redirect is that you can’t redirect the user to a new page.
For example, let’s say you changed the URL from “https://infowikiz-abc.com” to “https://infowikiz-efg.com” due to a site renewal.
Suppose you didn’t do a 301 redirect at this time.
If that happens, users who accessed the old URL of “https://infowikiz-abc.com” will not be able to access the new URL of “https://infowikiz-efg.com”.
In other words, the user cannot automatically transition to the new page.
As a result, users who accessed the old URL will be more likely to leave without accessing the new URL.
As you can see, the 301 redirect is necessary because the user cannot be automatically redirected to the new page.
An example where a 301 redirect is required
Here are some examples where a 301 redirect is required.
- If you change the URL and make it new
- When the contents of multiple pages are consolidated into one page
- When normalizing the URL
If you change the URL and make it new
A 301 redirect is required for when you change the URL and make it new.
For example, apply a domain acquired with a site renewal to a new site, or change the URL string of a specific web page to a new URL.
So let’s say you change the URL and make it new.
In this case, we need a 301 redirect because we need to forward the old URL to the new URL.
When consolidating the contents of multiple pages into one page
A 301 redirect is required forWhen consolidating the contents of multiple pages into one page.
For example, since it is duplicate content, the contents of the pages of “https://infowikiz.com/edf” and “https://infowikiz.com/ghi” are changed to the contents of the page of “https://infowikiz.com/abc”. Suppose we aggregate to
In other words, let’s say you want to consolidate content from multiple pages into one page.
In this case, the process of forwarding the page URL of “https://infowikiz.com/edf” and “https://infowikiz.com/ghi” to the page URL of “https://infowikiz.com/abc” I need a 301 redirect because I need it.
When normalizing the URL
A 301 redirect is required if you want to normalize your URL.
For example, the same content will be displayed when you access the page URLs “https://www.infowikiz.com” and “https://infowikiz.com” without www. Suppose you want to integrate it into the page URL of infowikiz.com.
So let’s say you want to normalize the URL.
In this case, 301 redirect is necessary because it is necessary to transfer the page URL of “https://www.infowikiz.com” to the page URL of “https://infowikiz.com”.
How to set up a 301 redirect
I will show you how to set up 301 redirects for each pattern.
- When forwarding by domain
- When transferring by page
- When transferring by directory
- When forwarding with SSL (change from http to https)
- When transferring using a WordPress plugin
When forwarding by domain
301 redirects are There is a setting method for forwarding by domain.
For example, suppose that only the domain name has changed from “www.infowikiz-abc.com” to “www.infowikiz-edf.com” due to the site renewal.
With this change, it is necessary to transfer the domain of “www.infowikiz-abc.com” to the domain of “www.infowikiz-edf.com”.
In this case, after writing the declaration of RewriteEngine on in the htaccess file, write the code including the domain name of the old site “www.infowikiz-abc.com” in “RewriteCond” that specifies the rule condition for URL rewriting, Write the code including the domain name of the new site “www.infowikiz-edf.com” in “RewriteRule” that specifies the execution of URL rewriting.
123 | RewriteEngine onRewriteCond %{HTTP_HOST} ^(www.infowikiz-abc.com)(:80)? [NC] RewriteRule ^(.*) https://www.infowikiz-edf.com/$1 [R=301,L] |
Alternatively, after writing the Redirect permanent declaration, write the transfer source URL (domain name of the old site “www.infowikiz-abc.com”) with an absolute path (URL-path) starting with “/ (slash)”. Enter the forwarding destination URL (domain name of the new site “www.infowikiz-edf.com”) as an absolute URL starting with the scheme name (http, etc.).
1 | Redirect permanent / https://www.infowikiz-edf.com/ |
Upload an htaccess file with one of these to your server.
After uploading, access “https://www.infowikiz-abc.com/seo301redirect (page URL under the domain of the old site)” and redirected page URL (page URL under the domain of the new site) to “https If the directory name and file name of the “seo301redirect” part are displayed without changing, such as “://www.infowikiz-edf.com/seo301redirect”, it means that the domain unit has been successfully transferred.
Here’s how to set up a 301 redirect if you change domains.
When transferring by page
301 redirects are There is a setting method for transferring by page.
For example, since it is duplicate content, if you aggregate and integrate the content of the page URL of “https://infowikiz.com/edf.html” with the content of the page URL of “https://infowikiz.com/abc.html” to do.
Along with this integration, it is necessary to transfer the page of “https://infowikiz.com/edf.html” to the page of “https://infowikiz.com/abc.html”.
In this case, after describing the declaration of RewriteEngine on in the htaccess file, specify the execution of URL rewriting in “RewriteRule”, and specify the transfer source URL (/edf .html), and then write the code that includes the transfer destination URL (https://infowikiz.com/abc.html) of the “absolute URL starting with the scheme name (http, etc.)”.
12 | RewriteEngine onRewriteRule ^/edf.html$ https://infowikiz.com/abc.html [R=301,L] |
Upload the htaccess file written like this to the server.
After uploading, access “https://infowikiz.com/edf.html (source page URL)” and the transferred page URL will be displayed as “https://infowikiz.com/abc.html” If so, it means that the pages have been successfully transferred.
Here’s how to set up a 301 redirect for page-by-page forwarding.
Transfer by directory
301 redirects are There is a setting method for transferring by directory.
For example, change the directory name of the page URL of “https://infowikiz.com/edf/seo.html” from “edf” to “abc” to “https://infowikiz.com/abc/seo.html” Suppose that the page URL has changed to something like
With this change, it is necessary to transfer so that only the directory name changes.
In this case, after writing the RewriteEngine on declaration statement in the htaccess file, write the code including the transfer source URL (edf) in the “RewriteRule” that specifies the execution of URL rewriting, and continue with “/ (forward slash). Write the code including the transfer destination URL (/abc) of the absolute path (URL-path).
12 | RewriteEngine onRewriteRule ^edf(.*)$ /abc$1 [R=301,L] |
Upload the htaccess file written like this to the server.
After uploading, access “https://infowikiz.com/edf/seo.html (source page URL)” and transfer page URL is “https://infowikiz.com/abc/seo.html” If it is displayed like this, it means that the directory has been successfully transferred.
Here’s how to set up a 301 redirect when forwarding by directory.
When forwarding with SSL (change from http to https)
301 redirects are There is a setting method when transferring with SSL (change from http to https).
For example, in order to improve the security of the website, it is assumed that the URL has changed from “https://infowikiz.com” to “https://infowikiz.com” by converting to SSL (changing the http protocol to https). To do.
Due to this change, it will be necessary to forward the URL from “https://infowikiz.com” to “https://infowikiz.com”.
In this case, after writing the declaration of RewriteEngine on in the htaccess file, write the code for the condition that it is not https in “RewriteCond” that specifies the rule condition for URL rewriting, and “RewriteRule” that specifies the execution of URL rewriting. Write the code including the URL name “https://infowikiz.com” converted to SSL in .
123 | RewriteEngine onRewriteCond %{HTTPS} offRewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] |
Upload the htaccess file written like this to the server.
After uploading, if you access “https://infowikiz.com (the page URL of the transfer source)”, the transferred page URL will be displayed as “https://infowikiz.com” or “https:// If you access infowikiz.com/abc/seo.html (source page URL) and the transferred page URL is displayed as “https://infowikiz.com/abc/seo.html”, All the pages in your site have successfully transferred from http to https.
This is how to set up a 301 redirect when transferring with SSL (changing from http to https).
When transferring using a WordPress plugin
301 redirects are There is a setting method for transferring using a WordPress plugin.
For example, when building a site with WordPress, there was duplicate content, so the content of the article “https://infowikiz.com/edf” was aggregated into the content of the article “https://infowikiz.com/abc”. Suppose you want to integrate
Along with this integration, it is necessary to redirect “https://infowikiz.com/edf” to the blog post page URL of “https://infowikiz.com/abc”.
In this case, install and activate the WordPress plugin ” Redirection ” to complete the setup.
After completing the setup, go to the setting screen and click “Add new transfer rule” at the bottom of the “Transfer rule” screen, and enter “https://infowikiz.com/edf” as the source URL (transfer source URL) and the target URL. Enter “https://infowikiz.com/abc” in (forwarding destination URL) and press the “Add forwarding rule” button to complete.
After completing the transfer, access “https://infowikiz.com/edf (source page URL)” and if the transferred page URL is displayed as “https://infowikiz.com/abc”, It will be transferred successfully. Here’s how to set up a 301 redirect when forwarding using a WordPress plugin
Summary: Understand the basics of 301 redirects and set them up properly
Understand the basics of 301 redirects, Let’s set it up properly.
On the other hand, if you do not set up 301 redirects or make a mistake, your SEO reputation will not be carried over well.
Specifically, if you set a client-side redirect such as meta refresh or javascript, it will return status code “200”, so it is not transfer processing to return status code “301 Moved Permanently”, which represents a permanent URL change. without it, the chances are high that SEO ratings will not carry over successfully.
Also, if you do not do a 301 redirect after changing the URL of the web page, you will not be able to carry over the backlinks attached to the URL before the change to the URL after the change. If that happens, the number of backlinks of the changed URL will decrease and it will be difficult to be evaluated by Google.
To avoid these bad situations, understand the basics of 301 redirects and set them up properly.