How to Redirect a Page or URL in WordPress (2 Methods)

2 weeks ago 21

Do you request to redirect a leafage oregon URL successful WordPress?

When a idiosyncratic follows a nexus to your website that leads to a leafage that doesn’t exist, they volition spot an mistake message. This mediocre idiosyncratic acquisition tin beryllium frustrating for your visitors and forestall them from becoming clients oregon customers.

In this article, we’ll amusement you however to hole breached links by redirecting pages and URLs successful WordPress.

How to Redirect a Page oregon  URL successful  WordPress

Why Redirect a Page oregon URL successful WordPress?

Links fto you link related pages connected your WordPress website. They assistance visitors navigate your tract and let hunt engines to easy find and scale your content.

However, broken links pb to a URL that doesn’t beryllium connected your website. When this happens, a frustrating 404 ‘Page Not Found’ mistake connection appears.

404 Page Example

This offers a mediocre idiosyncratic acquisition and whitethorn negatively interaction your SEO.

It whitethorn beryllium that the web leafage was deleted, the page’s URL was changed, oregon the idiosyncratic who created the nexus simply typed the incorrect URL.

Luckily, you tin easy track 404 errors and redirect the URLs to pages that bash exist.

With that being said, let’s instrumentality a look astatine however to redirect a leafage oregon URL successful WordPress. We’ll screen 2 methods:

Method 1: Creating Redirects Using All successful One SEO (AIOSEO)

The simplest mode to redirect pages and URLs successful WordPress is utilizing the All successful One SEO (AIOSEO) WordPress plugin. It’s the best SEO plugin for WordPress and offers a almighty Redirection Manager addon that makes it precise casual to acceptable up redirects.

Note: You volition need AIOSEO Pro to usage the redirection manager. There is besides a free version of AIOSEO, but it doesn’t see 301 redirects.

The archetypal happening you request to bash is instal and configure the AIOSEO Pro plugin connected your website. For step-by-step directions, spot our usher on how to acceptable up All successful One SEO correctly.

After that, you volition request to activate the Redirect Manager addon. Simply spell to All successful One SEO » Redirects and click the ‘Activate Redirects’ button.

Activate AIOSEO Redirects

Finally, you volition request to click connected the ‘Settings’ tab to prime a redirect method.

We urge the ‘PHP’ enactment due to the fact that it is the simplest and doesn’t necessitate method configuration of your web server.

Select the Redirect Method

Now you are acceptable to redirect your WordPress pages. You tin bash this utilizing the AIOSEO Redirection Manager oregon the WordPress contented editor.

Creating a Redirect From the AIOSEO Redirection Manager

While you are inactive connected the All successful One SEO » Redirects page, you tin navigate backmost to the ‘Redirects’ tab. This leafage lets you negociate your redirects and adhd caller ones.

To adhd a caller redirect, you request to adhd the post slug of the URL that isn’t working. The slug is the portion of the URL that comes aft your website’s domain name.

Let’s look astatine an example. The afloat URL of a station oregon leafage looks similar this:

In this case, the station slug is the past conception of the URL:


You request to benignant oregon paste the station slug of the breached nexus successful the ‘Source URL’ tract similar this:

Enter a Source URL successful  AIOSEO Redirection Manager

Tip: You tin redirect aggregate root URLs to the aforesaid people URL. Simply click the ‘Add URL’ fastener to adhd an other ‘Source URL’ field.

Next, you request to participate the station slug of the existing leafage that you privation to redirect the URL to. You request to benignant oregon paste this into the ’Target URL’ field.

Enter a Target URL successful  AIOSEO Redirection Manager

Alternatively, you tin simply benignant portion of the page’s rubric and AIOSEO volition amusement a database of matching posts and pages.

Once you click connected the close post, the slug volition beryllium entered for you.

Typing the Title of the Target Page successful  AIOSEO Redirection Manager

The past measurement is to take a redirect type.

Make definite that the ‘301 Moved Permanently’ redirect benignant is selected and past click the ‘Add Redirect’ button.

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

Now, you tin scroll down to presumption a log of the redirects you person created.

The ‘Hits’ file shows the fig of radical who visited the redirected link, and determination is simply a toggle enactment to alteration oregon disable idiosyncratic 301 redirects.

Log of Redirected Pages successful  AIOSEO Redirection Manager

Creating a Redirect From the WordPress Content Editor

You tin besides usage All successful One SEO to redirect a published station oregon leafage portion you are editing it.

When you scroll to the bottommost of the WordPress editor, you volition find an AIOSEO Settings section. You request to click the ‘Redirects’ tab.

Redirecting a Post oregon  Page From the Content Editor Using AIOSEO

Here you volition find the aforesaid redirection options that we covered above. The root URL has been filled successful for you, and you request to adhd the people URL.

After that, marque definite the ‘301 Moved Permanently’ redirect benignant is selected, and past click the ‘Add Redirect’ button.

A utile All-in-One SEO diagnostic is that if you alteration a post’s permalink portion editing it, AIOSEO volition automatically redirect the aged URL to the caller one.

Method 2: Creating Redirects Manually by Editing .htaccess

You tin besides redirect a leafage oregon URL without utilizing a plugin. To bash that, you request to manually adhd codification to your website’s .htaccess file. This method is not suitable for beginners due to the fact that a tiny mistake tin interruption your website.

Before utilizing this method, we powerfully urge making a backup of your .htaccess file.

After that, you tin marque changes to the record utilizing All successful One SEO’s exertion instrumentality oregon edit it straight utilizing FTP oregon your hosting provider’s record manager.

Editing .htaccess Using All successful One SEO’s .htaccess Editor

The All successful One SEO plugin offers an casual mode to edit your .htaccess file. However, you volition need All successful One SEO Pro to usage the .htaccess editor.

Once you person installed and configured AIOSEO, simply navigate to the All successful One SEO » Tools page. Next, you should power to the ‘.htaccess Editor’ tab.

Editing .htaccess File Using All successful  One SEO

This leafage volition amusement the contents of your .htaccess file. You request to paste your redirect codification astatine the bottommost of the record aft the ‘# END WordPress’ line.

Here is simply a elemental redirect wherever we are trying to nonstop a idiosyncratic visiting an aged station to a caller post.

RewriteEngine On Redirect 301 /thisistheoldurl/

Make definite you alteration the aged station and caller station URLs.

Once you person done this, click the ‘Save Changes’ fastener astatine the apical of the leafage to update the .htaccess record with the caller code.

Editing .htaccess Directly

You tin besides edit the .htaccess record straight without the request for a plugin. To bash this, you request to link to your website utilizing an FTP client oregon your hosting provider’s record manager.

You volition find the .htaccess record successful your website’s basal directory. If you don’t spot it there, past notation to our usher on why you can’t find .htaccess record connected your WordPress site.

You whitethorn beryllium capable to edit the record utilizing the record manager’s Edit feature. Otherwise, you tin download .htaccess to your machine and edit it utilizing a text editor like Notepad.

You should paste the pursuing redirect codification astatine the extremity of your .htaccess record aft the ‘# END WordPress’ line.

RewriteEngine On Redirect 301 /thisistheoldurl/

Don’t hide to alteration the aged station and caller station URLs.

Edit .htaccess File

Make definite you prevention your changes, and if necessary, upload the .htaccess record backmost to the server.

Now, you tin trial your redirect to marque definite it is redirecting decently arsenic you intended.

Now that you cognize however to redirect pages and URLs, you whitethorn similar to spot immoderate different guides related to redirection successful WordPress:

We anticipation this tutorial helped you larn however to redirect a leafage oregon URL successful WordPress. You whitethorn besides privation to spot our usher connected the quality betwixt 302 and 301 redirects, oregon our adept prime of the champion WordPress redirect plugins.

If you liked this article, past delight subscribe to our YouTube Channel for WordPress video tutorials. You tin besides find america on Twitter and Facebook.

Disclosure: Our contented is reader-supported. This means if you click connected immoderate of our links, past we whitethorn gain a commission. See how WPBeginner is funded, wherefore it matters, and however you tin enactment us. Here's our editorial process.

Editorial Staff

Editorial Staff astatine WPBeginner is simply a squad of WordPress experts led by Syed Balkhi with implicit 16 years of acquisition successful WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started successful 2009, WPBeginner is present the largest escaped WordPress assets tract successful the manufacture and is often referred to arsenic the Wikipedia for WordPress.

Read Entire Article