A redirect is a way to send visitors from one web page to another web page. There are different types of redirects, such as 301 (permanent), 302 (temporary), 307 (internal), etc. In this tutorial, We will show you how to make a redirect to another page in WordPress using two methods: the .htaccess file and the Redirection plugin.

Method 1: Using the .htaccess file

The .htaccess file is a configuration file that controls how your web server handles requests. You can use it to create redirects for specific pages or directories on your WordPress site. To do this, you need to:

  • Access your WordPress site’s root directory using an FTP client or a file manager in your hosting control panel.
  • Locate the .htaccess file and make a backup copy of it in case something goes wrong.
  • Open the .htaccess file with a text editor and add the following code at the end of the file:
# Redirect from old page to new page
Redirect 301 /old-page/ /new-page/
  • Replace /old-page/ with the relative path of the page you want to redirect from, and /new-page/ with the relative path of the page you want to redirect to. For example, if you want to redirect https://example.com/about-us/ to https://example.com/about/, you would use:
# Redirect from old page to new page
Redirect 301 /about-us/ /about/
  • Save the changes and upload the modified .htaccess file back to your server.
  • Test the redirect by visiting the old page URL and see if it takes you to the new page URL.

Method 2: Using the Redirection plugin

The Redirection plugin is a WordPress plugin that allows you to manage redirects from within your WordPress dashboard. You can use it to create redirects for individual pages, posts, categories, tags, etc. To do this, you need to:

  • Install and activate the Redirection plugin from the WordPress plugin repository or by uploading it manually to your WordPress site.
  • Go to Tools > Redirection in your WordPress dashboard and click on the Add new button.
  • Enter the Source URL of the page you want to redirect from, and the Target URL of the page you want to redirect to. For example, if you want to redirect https://example.com/about-us/ to https://example.com/about/, you would enter:
Source URL: /about-us/
Target URL: /about/
  • Choose the Redirect type from the drop-down menu. The most common one is 301 (permanent), which means that the redirect is permanent and tells search engines to update their index accordingly. You can also use other types of redirects, such as 302 (temporary), 307 (internal), etc., depending on your needs.
  • Optionally, you can add some Group and Title information for your redirect, which can help you organize and identify your redirects later.
  • Click on the Add Redirect button to save your redirect.
  • Test the redirect by visiting the old page URL and see if it takes you to the new page URL.

We hope this tutorial was helpful for you. If you have any questions or feedback, please let me know.

Categorized in:

Tagged in:

, ,