Do it is advisable redirect a web page or URL in WordPress?
When a person follows a hyperlink to your web site that results in a web page that doesn’t exist, they are going to see an error message. This poor person expertise might be irritating on your guests and forestall them from changing into purchasers or clients.
On this article, we’ll present you easy methods to repair damaged hyperlinks by redirecting pages and URLs in WordPress.
Why Redirect a Web page or URL in WordPress?
Hyperlinks allow you to join associated pages in your WordPress web site. They assist guests navigate your web site and permit engines like google to simply discover and index your content material.
Nonetheless, damaged hyperlinks result in a URL that doesn’t exist in your web site. When this occurs, a irritating 404 ‘Web page Not Discovered’ error message seems.
This presents a poor person expertise and should negatively influence your search engine optimisation.
It might be that the online web page was deleted, the web page’s URL was modified, or the one that created the hyperlink merely typed the flawed URL.
Fortunately, you’ll be able to simply monitor 404 errors and redirect the URLs to pages that do exist.
With that being stated, let’s check out easy methods to redirect a web page or URL in WordPress. We’ll cowl two strategies:
Technique 1: Creating Redirects Utilizing All in One search engine optimisation (AIOSEO)
The only strategy to redirect pages and URLs in WordPress is utilizing the All in One search engine optimisation (AIOSEO) WordPress plugin. It’s the greatest search engine optimisation plugin for WordPress and presents a strong Redirection Supervisor addon that makes it very straightforward to arrange redirects.
Observe: You will have AIOSEO Professional to make use of the redirection supervisor. There may be additionally a free model of AIOSEO, however it doesn’t embody 301 redirects.
The very first thing it is advisable do is set up and configure the AIOSEO Professional plugin in your web site. For step-by-step instructions, see our information on easy methods to arrange All in One search engine optimisation appropriately.
After that, you will want to activate the Redirect Supervisor addon. Merely go to All in One search engine optimisation » Redirects and click on the ‘Activate Redirects’ button.
Lastly, you will want to click on on the ‘Settings’ tab to pick out a redirect technique.
We advocate the ‘PHP’ possibility as a result of it’s the easiest and doesn’t require technical configuration of your net server.
Now you’re able to redirect your WordPress pages. You are able to do this utilizing the AIOSEO Redirection Supervisor or the WordPress content material editor.
Making a Redirect From the AIOSEO Redirection Supervisor
While you’re nonetheless on the All in One search engine optimisation » Redirects web page, you’ll be able to navigate again to the ‘Redirects’ tab. This web page permits you to handle your redirects and add new ones.
So as to add a brand new redirect, it is advisable add the put up slug of the URL that isn’t working. The slug is the a part of the URL that comes after your web site’s area title.
Let’s take a look at an instance. The complete URL of a put up or web page appears like this:
On this case, the put up slug is the final part of the URL:
You want to kind or paste the put up slug of the damaged hyperlink within the ‘Supply URL’ area like this:
Tip: You may redirect a number of supply URLs to the identical goal URL. Merely click on the ‘Add URL’ button so as to add an additional ‘Supply URL’ area.
Subsequent, it is advisable enter the put up slug of the prevailing web page that you simply want to redirect the URL to. You want to kind or paste this into the ’Goal URL’ area.
Alternatively, you’ll be able to merely kind a part of the web page’s title and AIOSEO will present an inventory of matching posts and pages.
When you click on on the right put up, the slug can be entered for you.
The final step is to decide on a redirect kind.
Make it possible for the ‘301 Moved Completely’ redirect kind is chosen after which click on the ‘Add Redirect’ button.
Now, you’ll be able to scroll all the way down to view a log of the redirects you’ve created.
The ‘Hits’ column reveals the quantity of people that visited the redirected hyperlink, and there’s a toggle choice to allow or disable particular person 301 redirects.
Making a Redirect From the WordPress Content material Editor
You can even use All in One search engine optimisation to redirect a broadcast put up or web page while you’re enhancing it.
Whenever you scroll to the underside of the WordPress editor, you will see an AIOSEO Settings part. You want to click on the ‘Redirects’ tab.
Right here you will see the identical redirection choices that we lined above. The supply URL has been stuffed in for you, and it is advisable add the goal URL.
After that, be certain the ‘301 Moved Completely’ redirect kind is chosen, after which click on the ‘Add Redirect’ button.
A helpful All-in-One search engine optimisation function is that should you change a put up’s permalink whereas enhancing it, AIOSEO will mechanically redirect the previous URL to the brand new one.
Technique 2: Creating Redirects Manually by Modifying .htaccess
You can even redirect a web page or URL with out utilizing a plugin. To do this, it is advisable manually add code to your web site’s .htaccess file. This technique is just not appropriate for inexperienced persons as a result of a small mistake can break your web site.
Earlier than utilizing this technique, we strongly advocate making a backup of your .htaccess file.
After that, you may make modifications to the file utilizing All in One search engine optimisation’s editor instrument or edit it straight utilizing FTP or your internet hosting supplier’s file supervisor.
Modifying .htaccess Utilizing All in One search engine optimisation’s .htaccess Editor
The All in One search engine optimisation plugin presents a simple strategy to edit your .htaccess file. Nonetheless, you will want All in One search engine optimisation Professional to make use of the .htaccess editor.
After you have put in and configured AIOSEO, merely navigate to the All in One search engine optimisation » Instruments web page. Subsequent, you must swap to the ‘.htaccess Editor’ tab.
This web page will present the contents of your .htaccess file. You want to paste your redirect code on the backside of the file after the ‘# END WordPress’ line.
Right here is a straightforward redirect the place we try to ship a person visiting an previous put up to a brand new put up.
Redirect 301 /thisistheoldurl/ http://yoursite.com/thisisthenewurl/
Be sure to change the previous put up and new put up URLs.
After you have finished this, click on the ‘Save Modifications’ button on the prime of the web page to replace the .htaccess file with the brand new code.
Modifying .htaccess Immediately
You can even edit the .htaccess file straight with out the necessity for a plugin. To do that, it is advisable connect with your web site utilizing an FTP shopper or your internet hosting supplier’s file supervisor.
One can find the .htaccess file in your web site’s root listing. In case you don’t see it there, then check with our information on why you’ll be able to’t discover .htaccess file in your WordPress web site.
You might be able to edit the file utilizing the file supervisor’s Edit function. In any other case, you’ll be able to obtain .htaccess to your pc and edit it utilizing a textual content editor like Notepad.
It is best to paste the next redirect code on the finish of your .htaccess file after the ‘# END WordPress’ line.
Redirect 301 /thisistheoldurl/ http://yoursite.com/thisisthenewurl/
Don’t neglect to alter the previous put up and new put up URLs.
Be sure to save your modifications, and if crucial, add the .htaccess file again to the server.
Now, you’ll be able to check your redirect to ensure it’s redirecting correctly as you meant.
Knowledgeable Guides Associated to Redirection in WordPress
Now that you know the way to redirect pages and URLs, it’s possible you’ll prefer to see another guides associated to redirection in WordPress:
Newbie’s Information to Creating 301 Redirects in WordPress
The best way to Discover and Repair Damaged Hyperlinks in WordPress (Step by Step)
The best way to Simply Monitor 404 Pages and Redirect Them in WordPress
The best way to Redirect Your 404 Web page to the Dwelling Web page in WordPress
The best way to Correctly Transfer WordPress from HTTP to HTTPS (Newbie’s Information)
The best way to Do a Full Web site Redirect in WordPress (Newbie’s Information)
We hope this tutorial helped you discover ways to redirect a web page or URL in WordPress. You may additionally wish to see our information on the distinction between 302 and 301 redirects, or our professional choose of the very best WordPress redirect plugins.
In case you appreciated this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You can even discover us on Twitter and Fb.
The put up The best way to Redirect a Web page or URL in WordPress (2 Strategies) first appeared on WPBeginner.
Subscribe to MarketingSolution.
Receive web development discounts & web design tutorials.
Now! Lets GROW Together!