Gccoe

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

Methods to Redirect a Web page or URL in WordPress (2 Strategies)


Do you’ll want to 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 may be irritating on your guests and stop them from turning into shoppers or clients.

On this article, we’ll present you 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.

404 Page Example

This gives a poor person expertise and will negatively impression your search engine marketing.

It could be that the online web page was deleted, the web page’s URL was modified, or the one who created the hyperlink merely typed the incorrect URL.

Fortunately, you may simply observe 404 errors and redirect the URLs to pages that do exist.

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

Creating Redirects Utilizing All in One search engine marketing (AIOSEO)Creating Redirects Manually by Modifying .htaccess (Superior)

Methodology 1: Creating Redirects Utilizing All in One search engine marketing (AIOSEO)

The only option to redirect pages and URLs in WordPress is utilizing the All in One search engine marketing (AIOSEO) WordPress plugin. It’s the greatest search engine marketing plugin for WordPress and gives a strong Redirection Supervisor addon that makes it very straightforward to arrange redirects.

Notice: You have to AIOSEO Professional to make use of the redirection supervisor. There’s additionally a free model of AIOSEO, however it doesn’t embody 301 redirects.

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

After that, you’ll need to activate the Redirect Supervisor addon. Merely go to All in One search engine marketing » Redirects and click on the ‘Activate Redirects’ button.

Activate AIOSEO Redirects

Lastly, you’ll need to click on on the ‘Settings’ tab to pick a redirect technique.

We advocate the ‘PHP’ choice as a result of it’s the easiest and doesn’t require technical configuration of your internet server.

Select the Redirect Method

Now you might be 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

When you are nonetheless on the All in One search engine marketing » Redirects web page, you may navigate again to the ‘Redirects’ tab. This web page helps you to handle your redirects and add new ones.

So as to add a brand new redirect, you’ll want to 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 identify.

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

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

On this case, the put up slug is the final part of the URL:

/old-coffee-link-is-broken/

It is advisable to kind or paste the put up slug of the damaged hyperlink within the ‘Supply URL’ area like this:

Enter a Source URL in AIOSEO Redirection Manager

Tip: You’ll be able to 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, you’ll want to enter the put up slug of the present web page that you just want to redirect the URL to. It is advisable to kind or paste this into the ’Goal URL’ area.

Enter a Target URL in AIOSEO Redirection Manager

Alternatively, you may merely kind a part of the web page’s title and AIOSEO will present a listing of matching posts and pages.

When you click on on the proper put up, the slug will probably be entered for you.

Typing the Title of the Target Page in AIOSEO Redirection Manager

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.

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

Now, you may scroll all the way down to view a log of the redirects you’ve gotten created.

The ‘Hits’ column exhibits the quantity of people that visited the redirected hyperlink, and there’s a toggle choice 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 can too use All in One search engine marketing to redirect a printed put up or web page if you are modifying it.

If you scroll to the underside of the WordPress editor, one can find an AIOSEO Settings part. It is advisable to click on the ‘Redirects’ tab.

Redirecting a Post or Page From the Content Editor Using AIOSEO

Right here one can find the identical redirection choices that we lined above. The supply URL has been stuffed in for you, and you’ll want to add the goal URL.

After that, ensure the ‘301 Moved Completely’ redirect kind is chosen, after which click on the ‘Add Redirect’ button.

A helpful All-in-One search engine marketing characteristic is that when you change a put up’s permalink whereas modifying it, AIOSEO will routinely redirect the previous URL to the brand new one.

Methodology 2: Creating Redirects Manually by Modifying .htaccess

You can too redirect a web page or URL with out utilizing a plugin. To do this, you’ll want to manually add code to your web site’s .htaccess file. This technique shouldn’t be appropriate for rookies 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 can also make adjustments to the file utilizing All in One search engine marketing’s editor instrument or edit it immediately utilizing FTP or your internet hosting supplier’s file supervisor.

Modifying .htaccess Utilizing All in One search engine marketing’s .htaccess Editor

The All in One search engine marketing plugin gives a straightforward option to edit your .htaccess file. Nonetheless, you’ll need 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 » Instruments web page. Subsequent, it’s best to swap to the ‘.htaccess Editor’ tab.

Editing .htaccess File Using All in One SEO

This web page will present the contents of your .htaccess file. It is advisable 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 are attempting to ship a person visiting an previous put up to a brand new put up.

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

Ensure you change the previous put up and new put up URLs.

After you have completed 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 too edit the .htaccess file immediately with out the necessity for a plugin. To do that, you’ll want to hook up with your web site utilizing an FTP consumer or your internet hosting supplier’s file supervisor.

You will see the .htaccess file in your web site’s root listing. Should you don’t see it there, then discuss with our information on why you may’t discover .htaccess file in your WordPress web site.

You could possibly edit the file utilizing the file supervisor’s Edit characteristic. In any other case, you may obtain .htaccess to your pc and edit it utilizing a textual content editor like Notepad.

You must paste the next redirect code on the finish of your .htaccess file after the ‘# END WordPress’ line.

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

Don’t overlook to alter the previous put up and new put up URLs.

Edit .htaccess File

Ensure you save your adjustments, and if obligatory, add the .htaccess file again to the server.

Now, you may check your redirect to verify it’s redirecting correctly as you meant.

Now that you know the way to redirect pages and URLs, it’s possible you’ll wish to see another guides associated to redirection in WordPress:

We hope this tutorial helped you discover ways to redirect a web page or URL in WordPress. You may additionally need to see our information on the distinction between 302 and 301 redirects, or our knowledgeable choose of the most effective WordPress redirect plugins.

Should you favored this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You can too discover us on Twitter and Fb.

댓글 달기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다