Publié le Mis à jour le 16 min de lecture

📌 Key takeaways

What is a redirect?
A redirect automatically sends visitors and search engines from an old URL to a new one.

The 301 redirect is the most common: it is a permanent redirect, to be used when a page is deleted or moved permanently.

When should you create a redirect?

  • Deleting a page or post
  • Changing permalinks
  • Changing domain name
  • Switching from HTTP to HTTPS
  • Optimizing URLs (shortening, readability)

Why is it essential?

  • User experience: prevents 404 errors and ensures smooth navigation
  • Search engine optimization: preserves the page’s authority and inbound links (backlinks)

How should you proceed?

  • With a plugin: Redirection (free), Rank Math, or Yoast SEO (premium version)
  • Without a plugin: via cPanel or the .htaccess file

Deleting a page on your website. At first glance, this seems like a routine operation you’ve probably already done several times. A couple of clicks, and you’re done. 

It’s simple. It’s quick… but be careful. This action can have negative consequences for your site’s SEO, as well as for the user experience!

To avoid this, adding a WordPress redirect is essential. Would you like to know how to proceed?

This article will explain everything to you. By the end of your reading, you will know why and in which scenarios to add redirects. 

And above all, you will have a step-by-step method for setting up redirects on your WordPress site, with or without a plugin.

What is a redirect on WordPress?

A redirect consists of redirecting the URL – web address – of content on your WordPress site (page or post) to another URL, either permanently or temporarily. 

Thanks to this SEO technique, internet users and search engine crawlers are informed that content no longer exists or is no longer up to date, while being automatically redirected to an updated URL. 

Behind the scenes, here is how a redirect on WordPress works. When a user clicks on or visits URL A (e.g.: https:\/\/www.maintenance-wp.com\/wordpress-support\/), they will automatically be sent to URL B (e.g.: https:\/\/www.maintenance-wp.com\/wordpress-maintenance\/).

What are the different types of redirect?

The most common HTML redirect is the 301 redirect. It is a permanent redirect – like the 308 redirect – which means “that the original URL should no longer be used and the new URL is preferred”, explains the Mozilla web browser documentation. It is intended “to last forever”. 

You will use it, for example, when you delete a page or post from your WordPress website. 

As a WordPress user, a 301 redirect is the one you will use most often day to day. This article will therefore focus primarily on this type of redirect in WordPress.

However, it is not the only one you will encounter. Alongside permanent redirects, there are two other families of redirects: 

  1. Temporary redirects (302, 303 and 307 redirects). The most famous of these is surely the 302 redirect. It specifies that a web page is not available at the moment. Your visitor is temporarily sent to a URL while an operation is carried out, such as updating content or putting the page into maintenance mode. In this case, search engines do not remember the temporary link, Mozilla explains. 
  2. Special redirects (300 and 304). There is very little chance you will ever use them, as they are very specific. The 304 redirect, for example, redirects a page to the locally cached copy. 

In what scenarios is creating a redirect necessary?

Redirecting a page permanently may not necessarily mean much to you, but you will see that using a 301 redirect in WordPress is necessary in several scenarios.

Thanks to redirects, you will prevent your visitors from encountering 404 errors, which indicate that a page no longer exists or cannot be found.

In practice, here are several situations that require setting up 301 redirects: 

  • deleting content (page/post). When you perform this operation, the URL still remains active (on the internet, not everything disappears as it does in word processing software). You must therefore redirect the deleted URL to a page of your choice, such as the homepage or a new updated page;
  • changing your site’s permalinks. These are the web addresses (URLs) of your website’s pages/posts. If you modify them, the structure of your URLs will change, which requires a 301 redirect;
  • a change of domain name, following a redesign of your WordPress website or a rebranding; 
  • modifying certain URLs in order to optimize them. For example, to make them shorter, easier to understand, and more readable on mobile devices (smartphones, tablets);
  • moving your site to a new directory;
  • switching your site from HTTP to HTTPS, in order to strengthen its security.
Switching from HTTP to HTTPS involves creating a WordPress redirect.
The Maintenance WP site uses HTTPS.

Why create redirects on WordPress?

As you have just seen, creating a WordPress redirect is necessary in several cases. It is also essential for two main reasons.

A redirect on WordPress preserves the user experience

Setting up a redirect on WordPress first helps ensure that your visitors have an optimal browsing experience on the pages/posts of your website.  

If you don’t redirect a URL that has become obsolete, your visitors will land on a 404 page and won’t find what they came looking for.

The WordPress.org 404 page.
The 404 page from the French version of the WordPress.org site.

Their user experience will deteriorate, and that is something to avoid. Indeed, 88% of users are more likely not to return to a website where they have had a poor user experience. 

In addition, thanks to an optimal user experience, you will improve your conversions and limit the negative impact on your revenue. 

According to an Amazon Web Services study, online stores lose 35% of their sales due to a poor user experience.

Consider creating custom 404 pages on your website to satisfy your users. To do this, you can use the templates offered by the page builder of your choice (Elementor, Divi Builder, Beaver Builder etc.), if you are familiar with this kind of tool. If you do not want to handle code, it is also possible to use dedicated WordPress plugins such as 404Page or SeedProd.

A redirect helps avoid penalizing your SEO

If you do not redirect the pages or posts that need it, your visitors will land on broken links. 

As you have just seen, these are bad for your visitors. When they click on them, they will be faced with a 404 error. 

This is just as troublesome for search engine robots (bots), which will no longer be able to crawl your site properly (in SEO jargon, this is called crawling).

If Google’s robots, the most widely used search engine in France, can no longer browse your pages or posts normally, they will have more difficulty indexing them and your ranking may be negatively affected (drop in positions on the search results page).

Indeed, Google wants to show its visitors the most relevant resource matching their search (the keyword they typed into the search bar).

You can well imagine that it will favor a page with high value-added content rather than a page containing a broken link. 

From an SEO standpoint, redirections (redirects) are very important because they allow you to: 

  • preserve the authority of the obsolete page by transferring it to the moved page. Thanks to this, the ranking of the redirected page is maintained; 
  • avoid losing backlinks (inbound links) created by other sites to yours. In terms of organic SEO, backlinks are among the most important criteria evaluated by Google when ranking a page. 

After these theoretical explanations, let’s move on to the technical side. We will now explain how to set up redirects on WordPress, with and without a plugin. 

How to create a redirect on WordPress with the Redirection plugin?

If you don’t know how to code and don’t want to handle sensitive files or code, the simplest and fastest solution for creating 301 redirects on WordPress is to use a plugin. You will also avoid making mistakes more easily.

For this, you have two options: 

  1. Using a dedicated extension almost exclusively for creating redirects. 
  2. Using a general SEO plugin that offers a feature for creating redirects.

We will detail these two options one by one, starting with the dedicated plugin case. 

In the official WordPress directory, the two main redirection plugins are Redirection and 301 Redirects.

For the purposes of this article, we will focus on Redirection rather than 301 Redirects for several reasons: 

  • it is the more popular of the two (2 million active installations compared with 200,000 active installations for 301 Redirects); 
  • all of its options are free;
  • it is frequently updated and has been very well maintained for many years; 
  • it is easy to use, with an interface translated into French; 
  • it is very highly rated.
The Redirection plugin allows you to create WordPress redirects.

Start by activating it in your WordPress admin interface via the Plugins > Add New menu.

A setup wizard will let you perform the first basic settings. You can leave the default options to begin with (you can change them at any time later).

The Redirection setup wizard on WordPress.

Create a simple redirect

To begin, we will create a simple WordPress redirect. To do this, go to the Tools > Redirection menu. 

You will arrive on the plugin interface, with 7 settings tabs (Redirects, Groups, Site, Logs, 404, Import/export, Options, Support).

The Redirection plugin tabs on WordPress.

Click the tab called “Redirects”, and go to the “Add a new redirection” section.

Let’s say you want to redirect an outdated URL A (e.g.: https:\/\/www.maintenance-wp.com\/wordpress-maintenance\/) to a URL B (e.g.: https:\/\/www.maintenance-wp.com\/wordpress-support\/). Here’s how to proceed:

  1. In the “Source URL” field, enter the outdated URL: https:\/\/www.maintenance-wp.com\/wordpress-maintenance\/
  2. In the “Target URL” field, enter the destination URL for the redirect, i.e. the new address of the web page you want your visitors to land on: https:\/\/www.maintenance-wp.com\/wordpress-support\/

You can leave the “Query parameters” option as is, and even create a group. This allows you to organize your redirects into specific folders. By default, the plugin sends them to the group called “Redirects”. 

If you have hundreds of WordPress redirects to create, it may be worth organizing them into groups. You can tackle this later by going to the “Groups” tab.

When you’re ready, finish by clicking the “Add redirect” button (the plugin will add a 301 redirect by default):

Adding a redirect on WordPress.

You will find your 301 redirect under the various settings tabs:

The Redirection plugin on WordPress lists all your redirects.

Wondering how to delete a redirect, for example if you acted too quickly or by mistake? Hover over the one you want in the list, then click “Delete”. If you simply want to temporarily disable it, click “Disable”.

Deleting a redirect on WordPress.

Create an advanced redirect

If you want to go further, you can configure advanced settings before creating a redirect on WordPress.

To do this, click the gear icon next to the “Add redirect” button.

New options will appear in the form of fields: 

  • the “Match” field lets you choose whether you want to redirect only the URL, or the URL and another element (URL and login status, URL and cookies, URL and IPs, etc.); 
  • the “When matched” field lets you choose which page you want to redirect the visitor to, and above all the type of redirect to set up (301, 302, 303, 304, 307, 308). Remember: in the vast majority of cases, you will only work with 301 redirects.
Creating an advanced redirect with the Redirection plugin on WordPress.

The other options in the Redirection plugin 

Beyond creating redirects for your WordPress site or blog, the Redirection plugin offers other additional options within its various tabs: 

  • “Groups” lets you segment and list your redirects; 
  • “Site” lets you redirect your entire site to a new domain name. You can also create a site alias, migrate permalinks, configure canonical settings, or add HTTP headers.
    As you have probably gathered, this section is mainly intended for experienced technicians. Don’t touch anything if you are not sure what you are doing! In fact, as a warning, Redirection states that “the options on this page can cause problems if used incorrectly.” Consider yourself warned…; 
  • “Logs” shows you which browsers and IP addresses have viewed your redirected content; 
  • “404” lists your 404 errors and lets you redirect the affected pages; 
  • “Import/export” allows you to import and export your redirects in various file formats (CSV, .htaccess, or JSON). You can, for example, use them on a site hosted on another server.
The Redirection plugin lets you import and export redirects.
  • “Options” offers a set of options to configure certain settings more precisely. This is also where you’ll find a very handy button in case you ever want to remove the plugin. By clicking the red “Delete” button, you will erase all data related to the plugin (database tables, logs, etc.).
  • “Support” shows you the operating status of the plugin. 

We’re done presenting one method for using the Redirection plugin. Let’s move straight on to the second option for creating a redirect on WordPress: using a general-purpose SEO plugin. 

How do you create a redirect with a general-purpose SEO plugin?

If you already use a plugin to optimize the SEO of your WordPress site, there’s a good chance it offers a feature for setting up 301 redirects. 

This is the case for the most famous of them, but be careful: there is still a subtlety you should know about. 

The option to add a redirect is not always available in the free version of the plugin (which justifies using a plugin like Redirection, if you don’t want to spend a single cent).

For example, Yoast SEO, the most famous of them (5 million active installations), allows you to create and manage redirects only in its premium version. Just like SEOPress. 

If you are looking for a free solution, we recommend using either the Rank Math plugin or the All in One SEO plugin. 
For the purposes of this article, we are going to show you the method with Rank Math, a plugin that is both very feature-rich and easy to use.

The Rank Math plugin lets you create redirects on WordPress.

Once you have activated it, go to Rank Math > Dashboard. Activate the module called “Redirections”:

Activating Rank Math’s Redirection module on WordPress.

Then go to the Rank Math plugin menu > Redirections to configure it. Click “Add”. Then enter:

  • the URL to redirect (Source URLs field); 
  • the destination URL;
  • the redirect type (e.g., 301 redirect); 
  • the redirect status (enable or disable).
Creating a redirect with Rank Math.

You now know how to create and configure a redirect in WordPress using a plugin. In the rest of this article, we’ll explain in detail how to do it manually, without using a redirection plugin. 

How to create a WordPress redirect without a plugin?

With a plugin, the big advantage is that you can handle all your redirects without leaving the WordPress dashboard.

You have everything within easy reach and don’t need to switch between different windows. This is the solution we recommend first and foremost.

However, there are other ways to add a redirect manually, without using plugins. We recommend them above all for more experienced WordPress users. 

Creating a redirect in WordPress with cPanel 

First method available to you: the administration interface provided by your web host. One of the best-known is called cPanel. We’ll therefore focus on it in the following lines. 

Once logged in to your cPanel, in the section called “Domains”, click the “Redirects” link:

The cPanel tool lets you create redirects in WordPress.

cPanel is primarily used to redirect the domain name pointing to your hosting account (for all your sites). This is very practical, for example, when migrating to a new domain name.

To do this, you need to: 

  • select a redirect type: Permanent (301) or Temporary (302); 
  • choose the domain or subdomain you want to redirect; 
  • fill in the field containing the slash if you simply want to redirect a single page of your domain name. For example, if you want to redirect the page https:\/\/www.maintenance-wp.com\/wordpress-website-creation\/, select the domain maintenancewp.fr and enter creation-sites-wordpress after the slash;
  • enter the destination domain name for the redirect (Redirects to field); 
  • choose whether you want to redirect with or without www; 
  • decide whether you want to create a wildcard redirect. If you check this box, all files in a directory will be redirected to the same file name as the redirected directory.
Adding a redirect in cPanel.

Finish by clicking the “Add” button. As you can see, the process is a little less intuitive than with a plugin. In addition, you cannot choose more than two types of redirects (301 and 302) to configure. 

Create a redirect with the .htaccess file

Now let’s move on to manual option no. 2: creating a new redirect on WordPress using the .htaccess file. 

This is a text file used by Apache web servers. You can add directives to it (with code) in order to configure htaccess redirects without using a plugin.

To learn how to create and edit a .htaccess file, check out our dedicated guide on the topic. There you’ll discover around ten directives to help you strengthen your site’s security, or improve the loading speed of your pages.

Before handling it, you must back up your site or blog using a dedicated plugin such as UpdraftPlus, or a tool such as WP Umbrella.

The slightest syntax error in the code you are going to add to the .htaccess file will crash your WordPress site. So it’s best to plan ahead and cover your bases.

Once you have opened your .htaccess file, add the following line of code to it (below the directives already present in your current file):

# Redirect one page to another
Redirect 301 /mapage.html https://www.votresite.fr/nouvellepage.html

Replace mapage.html with the name of the page you want to redirect and https://www.votresite.fr/nouvellepage.html with the URL to which you want your visitors to be redirected.

If you want to redirect to a new domain name, enter the following code:

# Redirect one domain name to another
Redirect 301 / https://nouveausite.fr/

Replace the URL https://nouveausite.fr/ with the one of your choice.

Summary

Creating and managing redirects on WordPress is essential to improve your users’ experience and preserve the organic SEO of your site/blog. 

This operation will be necessary whenever a URL becomes obsolete, for example when content is deleted or when changing a domain name. 

Throughout these lines, you have discovered that it is possible to add a 301 redirect: 

  • thanks to a dedicated plugin like Redirection, or with a general SEO plugin like Rank Math; 
  • using cPanel; 
  • via a directive added to your .htaccess file. 

You have read all our advice and would like support in setting up redirects on your site, or even a redirect plan? 

Contact the Maintenance WP team to benefit from a tailor-made solution that meets your needs quickly, professionally, and effectively.

Découvrez plus de contenus

fleche separateur

Voir plus d’articles