Changing permalink structure and page URL in WordPress is not a difficult process. One can do it easily!
Obviously, you do not prefer to change the web page if it is bringing more traffic. But, the situation turns to confuse you when it is about moving the WordPress site to a new domain name. This is where 301 redirects in WordPress come into play.
The aim of this guide is to give you every bit of important information about 301 redirects- what is it, how can you create it by plugins or by .htaccess? What are the redirection mistakes and how can you avoid them? To know the answers, keep scrolling.
What is 301 Redirect in WordPress?
It is a permanent redirect; from one URL to another URL. This is a method to notify search engines or browsers that you have moved from one location to another. Or, the requested post or page has been replaced or moved.
What happens without a redirect is called a 404 -Page Not Found error. Definitely, it can damage your site’s reputation and ranking, and for SERPs, you choose to avoid them. Certainly, the reason they are not only described as "redirects" is that there is more than one kind. Below are the other redirects:
- 302 Found
- 303 See Other
- 304 Not Modified
- 307 Temporary Redirect
- 308 Permanent Redirect
When we have other redirects then, why do we only hear or use 301 redirects? The reason is simple- it is the right way to assure that search engines and users are getting redirected to the exact web page. If you want to change the page URL, as displayed in the SERPs then, Google advises using 301 redirects.
Why or When 301 Redirect is needed?
There are reasons for changing the URLs in the first place, check them out below:
There might be a post that is meaningless and is not appealing to visitors. Of course, you do not want to bore, mislead or confuse them. So, if you are considering writing updated or related posts, then, it is recommended to delete the old posts and use the 301 redirect to send search engines and users asking old pages or posts to new URLs. However, you can also delete the old posts and instead, simply redirect the traffic to the web home page.
Switching to HTTPS
When you are using the non-secure connection (HTTP), and choose to change it to a secure HTTP with the help of a security certificate, you want visitors to experience the more secure connection (HTTP) of your site. Here, you will need a 301 redirect.
Switching to a New Domain
When you have changed the entire site to a new domain, then, assuredly, you do not want to lose current website visitors. There is a requirement to redirect them to the page you have created. Use 301 redirects here.
The purpose of 301 redirects is to manage it all after changing the web pages. It only means that you do not need to begin from the start.
How to Add 301 Redirects in WordPress using Plugins?
A simple yet effective approach to build and manage 301 redirects is using WP redirect plugins. It enables you to create redirects without writing any code.
All in One SEO (AIOSEO)
This plugin provides a great redirection manager add-on that has made it simple to search the broken links on the site and create 301 redirects to settle them.
For using the redirection manager, you will require the AIOSEO Pro version. Though, it also has a free version, but that does not cover the 301 redirects. After activating the plugin, move to All in One SEO->Redirects from the dashboard and select the "Activate Redirects" button.
Then, select the "Settings" tab from the redirects and choose "PHP" for the redirection. It is an easy technique to build redirects and server-side configuration is not required here.
Also, AIOSEO allows you to choose the webserver for the redirection. Though, it needs configuring NGINX or Apache on the web server. It needs technical expertise and is not meant for beginners.
Then, move to the "Redirect" tab for creating 301 redirects. Put the link for redirecting the source URL to enter the new location as of the link in the target URL field.
Soon after, choose from the dropdown menu the Redirect Type "301 Moved Permanently". Then, enter every detail, move and click on the "Add Redirect" button.
For redirecting different URLs to a new address, select the " Add URL" button from the source URLs area.
Then, scroll down to check the logs of the created redirects. It displays those users who have visited the redirected link from the "Hits" column; also, the option for disabling the 301 redirects.
Other than this,
the plugin will assist you in tracking the 404 error pages and fixing them. All you need to do is to navigate to the "Settings" tab and move down to the "Logos" section.
Allow the "Redirect Logs" and "404 Logs" options. Also, you can choose the time to maintain the logs. We advise you to keep them for a month at least for fast and smooth server performance.
Once you have allowed these options, assure to select the "Save Changes" button. Here, you will notice a new "404 Logos" tab in the Redirect section. The AIOSEO will find and show the broken links and let you do the redirections.
But, when you allow the 404 logs first, you will not be able to find any information. After the settings are enabled, the plugin will start recording the 404 error page.
When it is enabled, you can move to the 404 log section and check the broken link URL. In addition, you will examine how many have visited the link from "Hits" and the last accessed time and date.
Then, choose the 404 error URL you want to redirect and select the "Add Redirect" button. You will now check the possibilities to enter in the target URL and from the dropdown menu, choose the "Redirect Type".
Move on and out of the new URL, select "301 Moved Permanently" as redirection type and select the "Add Redirect" button.
The AIOSEO will build 301 redirects for the broken link. To find out if the redirections are accurately working, move to the old URL and know whether they are redirecting to a new target address or not.
The next method to create and manage the WordPress redirects is with the Redirection plugin.
First of all, install and activate the plugin on the website. After it is activated, move to Tools-> Redirection and then, select the "Start Setup" button for setting the plugin.
Now, you can choose the option for analyzing the permalink settings in WordPress and maintain the logs of 404 errors and every redirect. Simply, you can allow the options and select the "Continue Setup" button.
Now, the plugin will carry out testing of Rest API. Once you have checked the status, move on and select the "Finish Setup" button.
Soon after, move to Tools-> Redirection-> Redirects and make 301 redirects. There will be general settings to include redirection. Though, when you select the gear icon, you will notice the options to select the redirection type.
When you click on the gear icon, put on the Source URL on the old web page and include the target URL you need to redirect to.
Then, manage the HTTP code option from the dropdown menu to "301 – Moved Permanently". When you enter every detail, move ahead and select the "Add Redirect" button.
Page Links to
There are times when you like to keep the page or post, besides redirect it to another page or post. You can use Page Links to plugin here. The aim of this plugin is to include the meta-box on the WordPress editor to enter the address to the new address where you want to send the visitors.
Simple 301 Redirects
It is the next easily accessible plugin. From the name, it is clear that it makes creating 301 Redirects simple.
All you need to do is to install simple 301 Redirects and activate this plugin on the site. Once it is activated, move to Settings->301 redirects and use the old URL from the Requested field and the target URL from the destination field. After entering the details, select the "Add New" button to create the 301 redirects.
When you are in the process of creating the 301 redirects from WordPress plugins, you might face some performance setbacks. According to the WordPress hosting provider, WordPress redirects could be slower (some microseconds). For making the process faster, you can opt for the option of creating 301 redirects by .htaccess.
Creating 301 Redirects in WordPress using .htaccess
Setting up 301 redirects is also possible with the editing of the .htaccess web server configuration file. Always remember that a single mistake in the .htaccess code makes the WordPress website inaccessible and it can even start showing the Internal Server Error. This is the reason, it is essential to make a backup of the .htacess file before changing anything.
Use the All in One SEO plugin to edit the .htaccess file
The simple method for editing WordPress .htaccess file is by using All in One SEO for WordPress.
Just install and activate the plugin. Then, you have to visit the All in One SEO -> Tools-> web page and move to the .htaccess Editor tab.
Now, you can check the .htaccess file contents in the editor. Simply, put the redirect code that you want to include below. Below is an easy-to-use redirect where you can switch the visitor from the old page to the new one.
- RewriteEngine On
- Redirect 301 /a-very-old-post/ http://yoursite.com/a-very-new-post/
Choose the "Save Changes" button to save the settings. Then, the All in One SEO plugin will update the .htaccess file.
Edit WordPress .htaccess file directly
Also, you can edit the WordPress .htaccess file to create the redirects. For editing the file, you have to connect with the site by FTP client. The .htaccess file is in the root directory of the WordPress website.
If your .htaccess file is not there, then, you have to insist the FTP client show them. The .htaccess file can be edited in a plain text editor such as Notepad. Below is an easily accessible redirect to send the visitor from the old web page to the new one.
- RewriteEngine On
- Redirect 301 /a-very-old-post/ http://yoursite.com/a-very-new-post/
The above code can be added at the bottom of the .htaccess file. Do save the changes and upload the .htacces file to the server. Then, carry out the testing of redirects to assure that it redirects correctly or as needed.
Paid Plugins for 301 Redirection in WordPress
For only adding the 301 redirects, the above-mentioned free plugins are best. But, if the purpose is to access Search Engine Optimization and redirection features, then, you must choose the below-paid plugins:
We suggest you use the Really Simple SSL free plugin if you are including the 301 redirects for the website HTTP to HTTP transitions. It is used by almost 5 million WordPress websites. It has the ability to allow SSL and includes 301 redirects quickly. After purchasing and configuring the SSL certificate, a Really Simple SSL Plugin can be used.
Which 301 Redirect Mistakes to Avoid?
If you are editing .htaccess or using the plugin then the redirects are easy to manage. When compared to process compilation, the value it gives is more. Though, small mistakes in the process result in losses. Hence, assure to avoid the below mistakes:
Do not create 301 redirects when new pages have different content from old ones
When setting up the WordPress redirect, ensure that the new web page has 70 to 75% of similar content to the old one. Otherwise, it will influence SEO adversely.
Do not "just" redirect to the main URL when the domain name change
Consider the domain name is "new_site.org". When you switch to "new-site.com"; the URL redirects will be applied to every suitable web page site as well. It means that the main domain redirection is not enough.
Know if the rewrite rule has (*) in it. To know what it implies, re-visit the code for the above redirection (else check out the below image):
Do not edit the .htaccess file without taking backup
Undoubtedly! The. htaccess file may contain the default code, and the code included in it is by different plugins. Therefore, make sure to take a backup before editing anything.
Do not edit the .htaccess file without verifying the related hosts
Most of the time, the host might have unique WordPress 301 redirect rules. Therefore, it is better to know the host's restrictions and then move to the .htaccess file.
Frequently Asked Questions
1. How can we redirect 301 in WordPress?
The sole purpose of 301 redirects is to inform the search engines that the web page is moved permanently to a new location. For redirecting it in WordPress, either you have to edit the .htaccess file or use a powerful plugin from the WordPress repository.
2. How to redirect the URL in WordPress?
The WordPress redirect URL plugins, like, Redirection, 301 Redirects, 404 to 301 can be used to manage the 301 redirects to the site. To use more features related to SEO activities and redirection, the paid plugins, such as Yoast SEO, SEOPress on-site SEO, SmartCrawl by WPMU Dev can be preferred.
3. Tell us about WordPress 301 Redirect enabled?
When the WordPress 301 is enabled for the URL, it implies you have switched the URL to a new location. For making it transparent to search engine crawlers and redirecting the user to a new URL location, 301 redirects are used.
4. How to fix WordPress redirection error?
Follow the below guidelines to fix WordPress redirection issues:
- Delete the cookies
- Clear WordPress cache
- Create Redirects Rightly
- Disable the WordPress Plugins
- Examine third-party services
For more information, you can contact us!
5. Give us an example of URLs?
Uniform Resource Locator (URL) is a term of web address or internet address. It is a kind of standardized naming convention or URI to address the documents available on the Intranet or Internet. An example of a URL is https://www.wordsuccor.com/, which is a URL of WordPress Development Firm.
The capability of WordPress redirect URL if created by editing the .htaccess files or by using the redirect plugins does not waste your months or years of SEO efforts.
When moving to a new website from one domain to another, or carrying out the restructuring of URLs, ensure that you are using the 301 redirects of WordPress.
We hope that this article has answered every of your query on how to set up 301 redirects or what to avoid while creating them.
Do share your thoughts below in the comment section. Thanks for reading!