Do you want to redirect a web page or URL in WordPress?

When a consumer follows a hyperlink for your web site that results in a web page that doesn’t exist, they are going to see an error message. This deficient consumer revel in can also be irritating to your guests and save you them from changing into purchasers or shoppers.

On this article, we’ll display you learn how to repair damaged hyperlinks via redirecting pages and URLs in WordPress.

How to Redirect a Page or URL in WordPress

Why Redirect a Web page or URL in WordPress?

Hyperlinks mean you can attach comparable pages for your WordPress web site. They lend a hand guests navigate your website online and make allowance engines like google to simply in finding and index your content material.

Then again, damaged hyperlinks result in a URL that doesn’t exist for your web site. When this occurs, a irritating 404 ‘Web page Now not Discovered’ error message seems.

404 Page Example

This gives a deficient consumer revel in and would possibly negatively have an effect on your search engine marketing.

It can be that the internet web page used to be deleted, the web page’s URL used to be modified, or the one who created the hyperlink merely typed the fallacious URL.

Happily, you’ll simply monitor 404 mistakes and redirect the URLs to pages that do exist.

With that being stated, let’s check out learn how to redirect a web page or URL in WordPress. We’ll duvet two strategies:

Way 1: Developing Redirects The use of All in One search engine marketing (AIOSEO)

The most straightforward method to redirect pages and URLs in WordPress is the usage of the All in One search engine marketing (AIOSEO) WordPress plugin. It’s the very best search engine marketing plugin for WordPress and gives a formidable Redirection Supervisor addon that makes it really easy to arrange redirects.

Word: You’ll want AIOSEO Professional to make use of the redirection supervisor. There could also be a loose model of AIOSEO, nevertheless it doesn’t come with 301 redirects.

The very first thing you want to do is set up and configure the AIOSEO Professional plugin for your web site. For step by step instructions, see our information on learn how to arrange All in One search engine marketing accurately.

After that, it is important to turn on the Redirect Supervisor addon. Merely cross to All in One search engine marketing » Redirects and click on the ‘Turn on Redirects’ button.

Activate AIOSEO Redirects

In spite of everything, it is important to click on at the ‘Settings’ tab to choose a redirect way.

We advise the ‘PHP’ possibility as a result of it’s the most simple and doesn’t require technical configuration of your internet server.

Select the Redirect Method

Now you are prepared to redirect your WordPress pages. You’ll be able to do that the usage of the AIOSEO Redirection Supervisor or the WordPress content material editor.

Making a Redirect From the AIOSEO Redirection Supervisor

When you are nonetheless at the All in One search engine marketing » Redirects web page, you’ll navigate again to the ‘Redirects’ tab. This web page permits you to arrange your redirects and upload new ones.

So as to add a brand new redirect, you want so as to add the publish slug of the URL that isn’t running. The slug is the a part of the URL that comes after your web site’s area identify.

Let’s take a look at an instance. The total URL of a publish or web page seems like this:

https://instance.com/old-coffee-link-is-broken/

On this case, the publish slug is the closing segment of the URL:

/old-coffee-link-is-broken/

You wish to have to sort or paste the publish slug of the damaged hyperlink within the ‘Supply URL’ box like this:

Enter a Source URL in AIOSEO Redirection Manager

Tip: You’ll be able to redirect a couple of supply URLs to the similar goal URL. Merely click on the ‘Upload URL’ button so as to add an additional ‘Supply URL’ box.

Subsequent, you want to go into the publish slug of the prevailing web page that you just need to redirect the URL to. You wish to have to sort or paste this into the ’Goal URL’ box.

Enter a Target URL in AIOSEO Redirection Manager

Then again, you’ll merely sort a part of the web page’s name and AIOSEO will display a listing of matching posts and pages.

Whenever you click on on the proper publish, the slug might be entered for you.

Typing the Title of the Target Page in AIOSEO Redirection Manager

The closing step is to make a choice a redirect sort.

Be sure that the ‘301 Moved Completely’ redirect sort is chosen after which click on the ‘Upload Redirect’ button.

Make Sure the 301 Redirect Type is Selected in AIOSEO Redirection Manager

Now, you’ll scroll right down to view a log of the redirects you might have created.

The ‘Hits’ column displays the quantity of people that visited the redirected hyperlink, and there’s a toggle strategy to allow or disable particular person 301 redirects.

Log of Redirected Pages in AIOSEO Redirection Manager

Making a Redirect From the WordPress Content material Editor

You’ll be able to additionally use All in One search engine marketing to redirect a broadcast publish or web page when you are modifying it.

Whilst you scroll to the ground of the WordPress editor, you’ll in finding an AIOSEO Settings segment. You wish to have to click on the ‘Redirects’ tab.

Redirecting a Post or Page From the Content Editor Using AIOSEO

Right here you’ll in finding the similar redirection choices that we coated above. The supply URL has been stuffed in for you, and you want so as to add the objective URL.

After that, make sure that the ‘301 Moved Completely’ redirect sort is chosen, after which click on the ‘Upload Redirect’ button.

An invaluable All-in-One search engine marketing function is that in the event you trade a publish’s permalink whilst modifying it, AIOSEO will mechanically redirect the previous URL to the brand new one.

Way 2: Developing Redirects Manually via Modifying .htaccess

You’ll be able to additionally redirect a web page or URL with out the usage of a plugin. To do this, you want to manually upload code for your web site’s .htaccess record. This system isn’t appropriate for newbies as a result of a small mistake can wreck your web site.

Earlier than the usage of this system, we strongly suggest creating a backup of your .htaccess record.

After that, you’ll make adjustments to the record the usage of All in One search engine marketing’s editor device or edit it at once the usage of FTP or your webhosting supplier’s record supervisor.

Modifying .htaccess The use of All in One search engine marketing’s .htaccess Editor

The All in One search engine marketing plugin provides a very easy method to edit your .htaccess record. Then again, you’ll want All in One search engine marketing 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 marketing » Equipment web page. Subsequent, you will have to transfer to the ‘.htaccess Editor’ tab.

Editing .htaccess File Using All in One SEO

This web page will display the contents of your .htaccess record. You wish to have to stick your redirect code on the backside of the record after the ‘# END WordPress’ line.

Right here is an easy redirect the place we’re seeking to ship a consumer visiting an previous publish to a brand new publish.

RewriteEngine On
Redirect 301 /thisistheoldurl/ http://yoursite.com/thisisthenewurl/

Remember to trade the previous publish and new publish URLs.

After you have accomplished this, click on the ‘Save Adjustments’ button on the most sensible of the web page to replace the .htaccess record with the brand new code.

Modifying .htaccess Immediately

You’ll be able to additionally edit the .htaccess record at once with out the will for a plugin. To try this, you want to hook up with your web site the usage of an FTP shopper or your webhosting supplier’s record supervisor.

You’ll in finding the .htaccess record on your web site’s root listing. Should you don’t see it there, then discuss with our information on why you’ll’t in finding .htaccess record for your WordPress website online.

You might be able to edit the record the usage of the record supervisor’s Edit function. Differently, you’ll obtain .htaccess for your laptop and edit it the usage of a textual content editor like Notepad.

You will have to paste the next redirect code on the finish of your .htaccess record after the ‘# END WordPress’ line.

RewriteEngine On
Redirect 301 /thisistheoldurl/ http://yoursite.com/thisisthenewurl/

Don’t disregard to switch the previous publish and new publish URLs.

Edit .htaccess File

Remember to save your adjustments, and if vital, add the .htaccess record again to the server.

Now, you’ll take a look at your redirect to verify it’s redirecting correctly as you meant.

Now that you understand how to redirect pages and URLs, you could like to peer every other guides associated with redirection in WordPress:

We are hoping this educational helped you discover ways to redirect a web page or URL in WordPress. You may additionally need to see our information on the variation between 302 and 301 redirects, or our professional select of the most efficient WordPress redirect plugins.

Should you favored this newsletter, then please subscribe to our YouTube Channel for WordPress video tutorials. You’ll be able to additionally in finding us on Twitter and Fb.

The publish Redirect a Web page or URL in WordPress (2 Strategies) first gave the impression on WPBeginner.

WordPress Maintenance

[ continue ]