Are you looking to add 301 redirects to your WordPress site?
301 redirects assist in the resolution of 404 page not found issues by directing users to the correct page. It aids in enhancing your keyword ranks and giving a better user experience.
We’ll go over what a 301 redirect is and how to set one up on your website in this article.
What is a WordPress Redirect?
A redirect is a method for your website to send a brief message to your reader’s browser informing them that the page they wish to see has moved, so their browser can immediately redirect them to the new page of your choice.
Redirects come in a variety of forms, including 301 redirects, 302 redirects, 307 redirects, and so on.
We’ll concentrate on 301 redirects in this beginner’s guide because they’re the most vital for your WordPress website.
A 301 redirect moves a page to a new location permanently. It informs the browser that the page has been transferred permanently to the new site and that we have no plans to move it back.
Let’s take a look at when they’re appropriate to use.
When Should You Use a WordPress 301 Redirect?
When your site or a page on your site has been moved and you wish to redirect the user to a new page instead, you should utilize 301 redirects.
When you’re intending to delete a post or page in favor of new material, you’ll need to set up a 301 redirect. It’s also required if you want to change the permalinks for your post or page.
If you do not set up redirection, your users will receive a 404 page not found message. This not only degrades the user experience on your site, but it can also harm your WordPress SEO.
You probably have broken links on going through your brilliant blog, you intend to lose quite a bit of traffic. If you do the following, you will lose your domain authority and keyword ranking.
Why are 301 redirects important? These will let you tell serps that experts claim the page you plan to reach happens to be moved to a seperate location.
Decrease, the traffic to your previous page will likely be saved in your page.
Let ‘s look into how to create 301 diverts in WordPress.
Using Plugins, Create Redirects in WordPress
Using one of the many WordPress redirect plugins makes creating and managing 301 redirects much easier. You can set up redirects without writing a single line of code using this method.
The All in One SEO (AIOSEO) WordPress plugin is the easiest way to manage and produce 301 redirects. It’s the best WordPress SEO plugin, with over 2 million professionals using it to improve their site’s SEO.
AIOSEO is a robust redirection manager addon that makes finding broken links on your site and setting up 301 redirections to fix them a breeze.
Install and switch on the plugin AIOSEO Pro on your website. If you need to learn how to install a WordPress plugin, please pertain to the step-by-step guide.
Once the plugin is active, you’ll need to go to All in One SEO » Redirects from your WordPress dashboard and then click the ‘Activate Redirects’ button.
It is possible to go through the settings ” tab under redirects and choose PHP as the road method. This method does not require any server side configuration for making redirects.
You can also choose Web Server as the Redirect Method in AIOSEO. It does, however, necessitate setting up Apache or NGINX on your web server. This procedure necessitates technical expertise and is not suitable for beginners.
Create 301 redirections by going to the ‘Redirect’ tab.
In the Source URL field, type the link you want to redirect, and in the Target URL field, type the new link’s destination. Then, from the dropdown menu, choose ‘301 Moved Permanently’ as the Redirect Type.
After you’ve filled in all of these details, click the ‘Add Redirect’ button.
Simply click the ‘Add URL’ button under the Source URLs column to redirect several URLs to a new address.
After that, scroll down to see the logs for the redirects you’ve set up. Under the ‘Hits’ column, it displays the number of people who have visited the redirected URL, as well as an option to disable your 301 redirects.
Aside from that, AIOSEO may assist you to track down and fixing 404 error sites.
What just carry out is go to your options tab and scroll to the ‘Logs’ section. Then permit the options to get ‘404 Logs’ and ‘Redirect Logs.’
You can also select the period to keep the wood logs. We recommend keeping them to get a maximum of one week for smooth and fast storage space performance.
Following enabling these options, just remember to the ‘Save Changes’ button.
You should now visit a new ‘404 Logs’ tab seem in the Redirects section. This is where AIOSEO will trail and now have your broken links and can help you set up redirections.
On the other hand, when you first permit the 404 logs, you will not locate any data. The plugin simply starts to record 404 problem pages after enabling the options.
When enabled, you can go to the 404 Logs section and see the URL of the broken links. You will also discover the number of visits to the link under ‘Visits’ and the last seen date and time.
Next, click the ‘Add Redirect’ option after selecting the 404 error URL you want to redirect. You’ll now be able to type in a Target URL and choose a Redirect Type from a dropdown menu.
Enter your new URL, choose 301 Moved Permanently as the redirection type, then click the ‘Add Redirect’ button.
For your broken link, AIOSEO will now build a 301 redirect. To see if your redirections are operating properly, go to the old URL and see if they redirect to the new destination.
Be sure that add and manage redirects in WordPress is utilizing the Redirection plugin.
First, install and activate the Redirection plugin on your site. You can follow our detailed guide on how to install a WordPress plugin.
When activated, visit Tools» Redirection after which click the ‘Start Setup’ button to build the plugin.
Next, you can select options to screen permalink changes in WordPress and keep a log of your entire redirects and 404 errors. You can just allow these options and go through the ‘Continue Setup’ button.
The Rest API will now be tested by the plugin. Once the status has returned to Good, click the ‘Finish Setup’ button.
After that, you can establish your 301 redirects by going to Tools » Redirection > Redirects.
The fundamental settings for adding a redirection can be found here. If you click the gear icon, though, you’ll discover more possibilities for redirection types.
Simply input the Source URL of your old page and the Target URL you wish to redirect to after clicking the gear icon.
Then, from the dropdown menu, select ‘301 – Moved Permanently’ as the HTTP code choice. After you’ve filled in all of the information, click the ‘Add Redirect’ option.
It’s possible that you’ll wish to preserve a post or a page but redirect it to another. Page Links to comes in handy in this situation.
This simple plugin adds a meta box to your WordPress editor where you can input the address of the new location to which your users should be directed.
Simple 301 Redirects is another simple-to-use plugin. It simplifies 301 redirects, as the name implies.
To start, you must install and activate the plugin on your site. When you need help, follow the instructions in our guide on how to install a WordPress plugin.
And after that, visit Settings» 301 Redirects and enter your old URL inside of the Need field as well as your target WEB LINK within the Destination field.
For people with entered the aspects, go through the ‘Tasks’ button to build a 301 redirect.
While putting together 301 diverts via a WordPress plugin is not hard, it has minimal performance difficulties. Based on your WordPress hosting company, your WordPress redirects may be a little bit slower by some microseconds.
If you wish to make your diverts faster, you can apply so using the code method and. htaccess data file.
Setting Up 301 Redirects in WordPress using .htaccess
By modifying the.htaccess web server configuration file, WordPress users can also set up 301 redirects.
Please bear in mind that even a minor error in your.htaccess code can render your WordPress site inaccessible and cause an Internal Server Error to appear.
That’s why, before making any changes, you should make a backup of your.htaccess file.
Using the All in One SEO plugin, edit your.htaccess file.
Using the All in One SEO for WordPress plugin is the simplest approach to change your WordPress.htaccess file.
Just install and activate the Helpful SEO plugin. Thereafter, you must go to Washedout All in One SEO » Tools page and switch out to the. htaccess Publisher tab.
Coming from here, you will see your material of your. htaccess file in the editor. You can simply place any redirect code that you want to include at the bottom.
Here is a simple redirect where we are attempting to send a user going to an old post to a new post.
Make sure you click on the Save Changes button to maintain your settings. All in 1 SEO plugin will then upgrade your. htaccess file.
Directly Modify Your WordPress. htaccess document
You can also edit your WordPress. htaccess file directly to arrange up any redirects.
To modify your.htaccess file, you’ll need to use an FTP client to connect to your website. The.htaccess file is located in the root directory of your WordPress site.
If your.htaccess file isn’t visible, you’ll need to tell your FTP client to show hidden files. (Learn why your WordPress site’s.htaccess file is missing.)
Any plain text editor, such as Notepad, can be used to edit the.htaccess file.
Here’s a simple redirect that attempts to redirect a visitor from an old post to a new post.
You can add the code above to your.htaccess file, preferably at the end.
Are not able to save the changes and publish your. htaccess file back in the server. After that, you can test your redirect to make certain it is redirecting properly as you intended.
We hope this beginner’s an overview of creating WordPress diverts helped total up redirects on your site