If you are spending a lot of time finding the best way to create 301 Redirects in WordPress, luckily, this article gives you a step-by-step guide with many easiest methods. Let’s check them out.
What is a Redirect in WordPress?
Redirect is a useful way to notify your users that the link/page they want to access has been moved, so their browser will automatically point them to the new page you specified.
In addition, this feature is quite helpful, it is not only used in WordPress but also popular on the internet.
There are also various types of redirects including 301 redirects, 302 redirects, 303 redirects, 307 redirects, and 308 redirects.
When do you need to create redirects in WordPress?
It is necessary for you to generate a 301 redirect once you are going to remove a post or page to replace it with new content. Certainly, you will need to change the permalinks of your posts or page.
Whether you want to delete the URL but don’t create any 301 redirects, then it will cause your users to see a 404 page not found error. This fault will not only affect your site’s user experience but also have negative effects on your WordPress SEO.
However, redirect are able to decrease your page’s loading speed by a significant margin. Hence, you should diminish the usage of redirects by avoiding any unnecessary redirects.
How to create redirects in WordPress with free plugins?
Method 1:using the Redirect plugin
Redirection is one of the most popular and effective WordPress Redirect plugins. By using this plugin, you can minimize errors and improve your site ranking effectively.
In order to use this plugin, first of all, you need to install and active it.
Just similar to other plugins, you only need to go to Plugins > Add New in your WordPress admin panel. Then type the plugin’s name in the search bar. Quickly click on the Install Now button and Activate it.
Next, navigate to Tools > Redirection in your dashboard. And click on the Start Setup button to configure the plugin’s settings.
On the next page, you optionally choose options to monitor permalink changes in WordPress posts and pages and keep a log of all your redirects and 404 errors. Then click on the Continue Setup button to move to the next step.
The plugin will now test the Rest API. When the status displays as Good, go ahead and click on the ‘Finish Setup’ button.
Now, you need to go to Tools > Redirection again to create a new redirection. Here, you can view all of your active 301 redirects under the Redirects tab.
Simply click on Add New button to create a new 301 redirect. Otherwise, under Add new redirection section, you can insert a Source URL (the old URL) and a Target URL (the new URL).
Under Redirects, you can view all of your active 301 redirects and add new ones. To add a new 301 redirect, under Add new redirection insert a Source URL (the old URL) and a Target URL (the new URL).
In addition, if you click on the Gear symbol, it will provide you with more options to choose your redirection type.
Next, you can set the HTTP code option to “ 301 – Moved Permanently” from the dropdown menu. After that, click on the Add Redirect button to finish.
Method 2: using the Simple 301 Redirects plugin
As its name suggests, the Simple 301 Redirects Plugin makes it easier than ever to create 301 redirects.
After installing the plugin, you just navigate to the Settings > 301 Redirects page from your WordPress Admin panel.
Next, simply enter your old URL under the Request field and the new URL under the Destination field. After you have entered yet, let’s click on the Add New button.
How to create 301 redirects in WordPress by using .htaccess?
In addition to using WordPress Redirects plugins, you can also create 301 redirects in WordPress by adding code to your .htaccess file. Initially, to use this method, make sure to generate a backup of your site by using one of the best WordPress Backup Plugins.
After that, let’s assess the .htaccess file using an FTP client and add the following code at the end of the file if you want to redirect a single page to another page. Especially, make sure that you replace the example URLs and save the file.
Redirect 301 /old-page.html http://www.example.com/new-page.html
If you want to redirect an entire domain to another domain name, you can add the following code. This code snippet will send users to the same URL slug at the new domain name. It means visitors who access oldsite.com/test-post will be redirected to newsite.com/test-post. Similarly, make sure to replace the example URLs in the following code with your actual ones.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(?:www\.)oldsite\.com$ [NC]
RewriteRule ^ http://newsite.com%{REQUEST_URI} [L,R=301]
After that, remember to save the file. Now, the redirect will start working properly.
Sum up
We have just shown you the simplest and most efficient methods to easily create 301 redirects in WordPress. Hopefully, this article is worthwhile for your website. If you have any questions or queries, please leave a comment below. We are willing to support you as soon as possible.
Moreover, you can visit our Free WordPress Themes to explore a lot of beautiful and modern themes for your website.
- What are joomla tags and how are the used? - November 3, 2024
- Why and how to create hidden menu items in Joomla? - October 31, 2024
- How to publish smartslider 3 to joomla 4? - October 31, 2024
Recent Comments