How to Redirect in WordPress

How to Redirect in Wordpress

To redirect a URL means to resolve an existing URL to a different one. Through this the page content is assigned a new location.

Ocassionally for whetever reason, you may change URLs in your site. Maybe you've migrated your website to a different domain, or combining some of your content into one.

If such is the case then you need to redirect or resolve the old url to the new one. In this tutorial you will learn how to redirect URLs in wordpress using various plugins.

Scanario 1: Redirecting Old/New URLs

Basically redirecting for SEO. Complete general redirect scanarios:

(a). Solution 1: Use Redirection

This is the most downloaded redirect manager for WordPress.

With it you can easily manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have. This can help reduce errors and improve your site ranking.

With Redirection you can easily manager redirects in both small and large sites. It is efficient and straightforward in it's usage.

You can use it to Create and manage redirects without needing Apache or Nginx knowledge. If your WordPress supports permalinks then you can use Redirection to redirect any URL.

There is full support for regular expressions so you can create redirect patterns to match any number of URLs. You can match query parameters and even pass them through to the target URL.

You can also use it for conditional redirects involving the following:

  • Login status – redirect only if the user is logged in or logged out
  • WordPress capability – redirect if the user is able to perform a certain capability
  • Browser – redirect if the user is using a certain browser
  • Referrer – redirect if the user visited the link from another page
  • Cookies – redirect if a particular cookie is set
  • HTTP headers – redirect based on a HTTP header
  • Custom filter – redirect based on your own WordPress filter
  • IP address – redirect if the client IP address matches
  • Server – redirect another domain if also hosted on this server
  • Page type – redirect if the current page is a 404

And here is an image showing the list if already added redirects:

Step 1: Install it

Go to Plugins > Add New, search for this plugin. Then click install. Then activate it. You can also download it manually from here.

Step 2: Use it

Once activated, head over to Tools -> Redirection and start adding redirects. Here is a demo image showing how to add a new redirect:

Reference

Read more about this plugin here.

Solution 2: Use 301 Redirects – Easy Redirect Manager

This is a wordpress plugin that allows you manage 301, 302 and 307 redirects in your site.

It is also user-friendly and reliable. This plugin is also able to show you the 404 errors since it keeps a log of them.

301 Redirects GUI is located in WP Admin – Settings – 301 Redirects
404 Error Log widget can be found in the WP Admin – Dashboard

Here are it's core features:

  • Choose from Pages, Posts, Custom Post types, Archives, and Term Archives from dropdown menu
  • Or, set a custom destination URL!
  • Retain query strings across redirects
  • Super-fast redirection
  • 404 error log
  • 404 error log widget
  • Import/Export feature for bulk redirects management
  • Simple redirect stats so you know how much a redirection is used
  • Fully compatible with translation plugins (Weglot, TranslatePress, Gtranslate, Loco Translate) that use lang prefix in URL.

Step 1: Install it

Go to Plugins > Add New, search for this plugin. Then click install. Then activate it. You can also download it manually from here.

Step 2: Redirect

Once activated, head over to the WP Admin – Settings – 301 Redirects and start adding your redirects as shown in the screenshot below:

Here is how this plugin looks after installation:

Reference

Read more about this plugin here.

Solution 3: Use Simple 301 Redirects by BetterLinks

This plugin allows you to create Simple 301 Redirects in your WordPress site.

Through this you can fix the 404 errors in your website. You can use it to easily redirect old URLs to new ones.

Simple 301 Redirects provides an easy method of redirecting requests to another page on your site or elsewhere on the web. It’s especially handy when you migrate a site to WordPress and can’t preserve your URL structure.

By setting up 301 redirects from your old pages to your new pages, any incoming links will be seamlessly passed along, and their page rank (or what-have-you) will be passed along with them.

Here are the main features of this plugin:

  • Designed for any websites with very easy and user friendly interface which you can set up in few seconds
    -)Works great eCommerce, blog, magazine, small business and any others websites
  • Import Redirect Rules: You can import redirects links in bulk from your device and upload using this plugin to manage links
  • Export Redirect Rules: You can also export your 301 Redirect Links in .csv format to use in future
  • Wildcards: It will redirect all files within a directory to the same filename in the redirected directory. To use wildcards, put an asterisk (*) after the folder name that you want to redirect. Example:
  • Request: /old-folder/*
  • Destination: /new-folder/*

Here's how you use it:

Step 1: Install it

Go to Plugins > Add New, search for this plugin. Then click install. Then activate it. You can also download it manually from here.

Step 2: Add Redirects

Once activated, head over to Settings > 301 Redirects page and start adding redirects. Check the screenshot below:

Reference

Read more about this plugin here.

Scenario 2: Redirect After Event

Learn how to redirect to a page after an event occurs. For example after a purchase is made, or after an email is sent.

(a). Redirection for Contact Form 7

This plugin allows you to redirect to any page you choose after mail sent successfully, firing scripts after submission, save submissions in database.
NOTE: This plugin requires Contact Form 7 version 4.8 or later.

Here are it's main features:

  • Redirect to any URL
  • Open page in a new tab
  • Run JavaScript after form submission (great for conversion management)
  • Pass fields from the form as URL query parameters
  • Add Honeypot to minimize spam
  • Save form submissions to your database

Here's a screenshot demo:

Step 1: Install it

Go to Plugins > Add New, search for this plugin. Then click install. Then activate it. You can also download it manually from here.

Step 2: Add Redirects

Simply go to your form settings, choose the Redirect Settings tab and set the page you want to be redirected to.

Reference

Read more about this plugin here.

(b). Thanks Redirect for WooCommerce

With this plugin you can define Global Thank You page for your Customers based on Success or Failure.

This permits you to make your own Thank You Page with a custom thank you message, particular to your store and to your objective.

After a purchase, your customers will be redirected to the custom WooCommerce Thank You page rather than the default WooCommerce’s Thank You page.

Here are it's features:

  • Functionality to set Global Thank You page for your Customers based on Success or Failure.
  • Set per product redirect urls.
  • Allows you to make your own Thank you message, particular to your store and to your objective.
  • Fully Tested with latest wordpress and woocommerce versions.
  • Order Details on Thank You page. ( New Feature Update )
  • Supports Multiple Products in Cart
  • Supports Downloadable Products, downloadable product details on Thank You Page.
  • Language Translations through POT, PO files.

Step 1: Install it

Go to Plugins > Add New, search for this plugin. Then click install. Then activate it. You can also download it manually from here.

Step 2: Configure and Add Redirects

Once activated, head over to Dashboard > WooCommerce > Settings > Products > Thanks Redirect for WooCommerce page and start configuring and adding redirects. Check the screenshot below:

Configuration:

Then add redirect:

Reference

Read more about this plugin here.

Related Posts