WordPress Redirects

Your Guide to Setting up WordPress Redirects

A WordPress website is never "finished". You adapt it over the years again and again, improve, optimize and implement new ideas. This also means that at some point you will have to set up redirects.

In this article we'll show you how to implement WordPress redirects both with and without a plugin and why they are so important.

What are redirects?

Redirects are used by website owners to redirect to another URL when someone clicks on a link. This may be necessary, for example, if you move one of your websites to a new domain or rename a subpage, blog article, or landing page.

With a redirect, you offer your visitors the chance to reach your current content even via an outdated link.

Why would you set up redirects?

It may make sense for you to set up a WordPress redirect for a number of reasons: Did you rename a post on your blog? Or change your entire domain? A redirect is essential in both cases.

It helps you redirect one URL to another URL and bring your website visitors to your content. Even if, for example, they clicked on a link in a newsletter you sent before the conversion.

You may need to set up redirects in the following situations:

  • You revise the structure of your website
  • Your WordPress website is being moved to a new domain
  • You delete one of your pages because you don't need it anymore
  • You change parts of the URL or the permalink of a page or post
  • You merge multiple WordPress projects into one

If you set up your redirects smartly, it can have a very positive effect on the user experience and search engine optimization of your websites. Your page rank can improve as you pass on signals such as interaction data and your URL structure to the target URL. Among other things, the search engine uses these to assess whether search results are relevant.

What happens if you don't set up a redirect?

Without redirects, users end up on error pages or receive error messages. This can lead to frustration and a poor user experience, as well as lower rankings on Google and other search engines.

In the end, visitors will leave your website and not return because of their negative experience. In the worst case, this will negatively affect your business, for example, if you run an online store with WooCommerce.

If you don't set up a redirect after renaming a page, anyone who clicks on the outdated URL will see a 404 error page. To avoid this, you should always set a redirect. This is also important for usability.

Also remember that you can only share your link juice (the distribution of backlinks within your website and their strength) if you use redirects.

How to design a 404 page

If you can't prevent visitors landing on an error page, you can at least keep them on board with well-designed error messages. We show you how to create a 404 page with WordPress and Visual Composer in our magazine.

What are the redirects?

But what actually happens in the background during a redirect? We are talking about a total of five different redirect types. You can recognize each of them by their three-digit status code.

The most commonly used redirect is the 301 redirect. With this redirect, you give the search engine the hint that it is a permanent redirect. You also pass the link juice to the new URL. In addition, there are other types of redirects that you should know:

  • 301: With a 301 redirect you redirect a URL permanently to another URL.
  • 302: If you want to redirect a URL only temporarily, you use a 302 redirect. You do not pass the Juice link to the redirect address.
  • 307: A 307 forwarding is like a 302 forwarding. The only difference is that the HTTP request method remains unchanged.
  • 410: You set up a 410 redirect when you permanently delete a URL. You send a hint to the search engine that it should remove the URL from the index.

How does a redirect work?

Redirects are divided into server-side and client-side redirects. For server-side redirects (301, 302, and 307), you use a tool, the code of your website, or a plugin to add a command to your .htaccess file. At Raidboxes this is much easier but more on that later. The commands cause the server to immediately redirect people who call the corresponding URL to the new URL you specify.

With client-side redirects, you do not need to make any changes to the server. In this case, you store your redirects directly in the source code. However, you should avoid client-side redirects for search engine optimization purposes.

Internet users, in general, rarely notice redirects. You can therefore use automatic redirects very well to redirect your URLs without affecting the visitors of your website. There are several different approaches for your WordPress redirects. We would like to introduce three of them to you in the following.

Set up WordPress redirects manually

If you choose to set up your WordPress redirects manually, log in to your server using your FTP access. Then go directly to the .htaccess file. You can find it in the root directory of your WordPress installation. If you don't see it right away, it might be hidden. In this case, you need to show it through the options of your FTP program.

How to redirect individual subpages manually

Once you've located the .htaccess file, redirect all links from the old URLs to the new ones. To do this, enter the following code, using a 301 redirect as an example:

RewriteEngine on
redirect 301 /verzeichnis/url-alteseite https://deinedomain.de/url-neueseite

The entry RewriteEngine on activates the Apache module mod_rewrite. You need it only once and you can add more redirects under it.

Use the redirect command to tell the server that you have set up a redirect. Then you enter the old URL directly, followed by the new one. This will redirect your visitors from your old to your new page. Test this yourself to see if the entry was created correctly.

How to move a complete domain manually

If you've decided to forward a domain completely, you do not need to do this with all subpages individually. Examples of how you can also do this via an entry in the .htaccess file can be found in this post.

But be careful: When you make changes to the .htaccess file, there is always some risk involved. If you enter a command incorrectly, it can cause an internal error and make your website unavailable.

In addition, this type of WordPress redirection only works on Apache servers. So you can't use it on a NGINX server. Also Raidboxes uses NGINX - and thus automatically takes care of everything normally associated with .htaccess files, including redirects. But more about that later.

WordPress redirect plugins

When using WordPress plugins, you should always make sure that the performance of your website is not affected too much. The Raidboxes Dashboard is often a much faster way to do this. We'll take a closer look at three of the most popular and powerful WordPress redirect plugins:

1. Redirection

The most popular plugin for WordPress redirects is Redirection. You can redirect your blog articles and websites to other URLs - in all possible ways. In case of a 404 error, Redirection offers you a 404 monitor.

WordPress Redirects plugin Redirection
The WordPress redirects plugin Redirection

It also gives you the ability to import and export your data. Once you've installed the plugin, a handy setup wizard will take over and help you redirect and rename your pages.

2. Simple 301 Redirects

Another practical plugin, which in our eyes is a good choice for WordPress beginners, is Simple 301 Redirects. Once installed, you can find it in WordPress under "Settings". From there you simply navigate to "301 Redirects" to set up and edit your redirects.

WordPress Redirects plugin Simple 301 Redirects
The plugin Simple 301 Redirects

Once there, enter the outdated URLs under "Request" and the new ones under "Destination". Again, make sure that you use the relative URLs, for example /free-wordpress-migration/ instead of https://raidboxes.io/free-wordpress-migration/.

3. All in one SEO

The third plugin we can recommend for your WordPress redirects is All in One SEO. This is a slightly comprehensive solution, which comes into question especially if you are also looking for an SEO plugin. The free version includes everything you need to start optimizing your websites.

However, only in the paid version you get - among other features - a rather powerful redirect manager that helps you to manage your redirects and 404 errors. Just enter the old or new URLs in the appropriate fields, just like with Simple 301 Redirects and Redirection.

WordPress Redirects plugin All in one SEO
The plugin All in One SEO also supports redirects

You can also redirect your website's visitors to a single URL, even if you have deleted the page. And you can set up redirects for multiple URLs in one go. In addition, the plugin gives you a log of all redirects and 404 messages on your website.

Optimize your websites with WordPress SEO

SEO is on your mind and you want to learn more? We explain what's important and how you can optimize your texts for search engines with WordPress SEO. In addition, we compare two of the most popular WordPress SEO plugins in our article on Yoast vs Rank Math.

WordPress Redirects with Raidboxes

Redirects are important so that your readers can always reach their destination via your links. As shown above, you can set them up manually and via plugins. But there is also a third way. If you want to set up a redirect and redirect, there is an integrated function in the Raidboxes Dashboard.

This means you no longer need a plugin for your redirects and can make your website leaner and faster – the loading time can be noticeably increased by redirects via plugins. With these three simple steps, you can set up redirects directly via your Box:

1. Add your redirect

  • Go to the Settings tab of your website in the Raidboxes Dashboard
  • Select the item Redirects and click on URL Redirects
  • Click on Add redirects
  • Set your redirect by filling in the form and click on Save to confirm the change.
URL Redirects Raidboxes Settings
Create a new redirect

2. Set the relative URL

Both URLs - the source URL and the destination URL - refer to the domain of your website. Thus, when you set up a redirect, the home page always redirects to the subpage you specify.

Important: For this to work, you always enter the relative URL at this point, not the absolute one. This means that you only transfer the path into the field, not the complete URL. For example, instead of https://raidboxes.io/blog/wordpress-speed-test/ you would enter /blog/wordpress-speed-test/.

External redirects and redirecting an entire domain are exceptions to this, of course. In these cases, you have to specify the absolute URL.

3. Save and check your redirect

After you have set up your redirect through your Box, you can grab a cup of coffee. It may take a moment before your redirect is really active, this is also true for redirect plugins.

Especially if you've several redirects at once, you should carefully check after this time that everything is working to your satisfaction and that you've not forgotten any redirects.

"*" indicates required fields

I would like to subscribe to the newsletter to be informed about new blog articles, ebooks, features and news about WordPress. I can withdraw my consent at any time. Please note our Privacy Policy.
This field is for validation and should not be changed.

Conclusion: You don't always need a plugin

Of course, it's not every day that you have to create redirects for your WordPress websites. But when it does, for example because you have planned a comprehensive website relaunch including a change of domain, you should know what is important. Especially 301 redirects happen again and again in the lifecycle of a website.

If you need to set up WordPress redirects, there are several methods you can use. Raidboxes helps you keep track of your redirects without you having to go to a plugin. This way you can easily edit your redirects through your Box settings.

Frequently asked questions about WordPress redirects

What are regular expressions?

If you want to forward whole groups of URLs, you can use so-called "regular expressions". You then create a set of rules for your redirects, according to which they should be logically structured or prioritized.

This is also called "rewrite rules". For single redirections or the redirection of a complete domain you don't need regular expressions. On the website of  regex.com you can find an overview of many regular expressions.

Why 301 and 410? Where do the number codes come from?

The first digit of a status code always stands for the status class - "1" stands for "information", "2" for "successful operation", "3" for "redirection", "4" for "client error" and "5" for "server error".

The HTTP status codes define RFC 1945 for HTTP 1.0 and RFC2616 for HTTP 1.1. For HTTP 2 and 3, the codes remain the same.

What is a hidden redirect?

With a hidden redirect, the actual destination URL is not visible in the address bar of the browser. As the website owner, you choose the displayed URL yourself, thus masking the actual destination address.

This is also called "frame forwarding". This technique has the advantage of making pages load faster. However, the term tends to have a negative connotation, as hidden redirects are also often used to redirect visitors to other pages without their knowledge - for example, through a malicious script, a change in DNS settings, or code that has been smuggled into a website.

Your questions about WordPress Redirects

What experience do you have with WordPress redirects? What questions are still open? Tell us in the comments. You want to be informed about further posts about WordPress and WooCommerce ? Then follow us on LinkedIn, Facebook, Twitter or sign up for our newsletter.

Did you like the article?

Your rating helps us improve our future content.

Post a comment

Your email address will not be published. Required fields are marked with *.