WordPress redirects

Setting up WordPress redirects - how it works

A WordPress website is never "finished". You keep adapting it over the years, improving it, optimizing it and implementing new ideas. Conversely, this also means that at some point you will have to set up redirects.

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

What are redirects?

Redirects are used by website operators 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 access your current content via an outdated link.

Why should you set up redirects?

It can make sense to set up a WordPress redirect for various reasons: Have you renamed a post on your blog? Or have you changed your entire domain? A redirect is essential in both cases.

It helps you to redirect a URL to another URL and take your website visitors to their destination, i.e. to your content. Even if, for example, they clicked on a link in a newsletter that you sent before the changeover.

The following points may mean that you have to set up redirects:

  • You revise the structure of your website
  • Your WordPress website should move to a new domain
  • You delete one of your pages because you no longer need it
  • You change parts of the URL or the permalink of a page or a post
  • You merge several WordPress projects into one

If you set up your redirects cleverly, this can have a very positive effect on the user experience and search engine optimization of your websites: Your page rank improves and 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 experience, but also to lower rankings on Google and other search engines.

In the end, visitors leave your website and don't return because of their negative experience. In the worst case scenario, this has a negative impact on your business if you run an online store with WooCommerce, for example.

If you do not set up a redirect after you have renamed a page, everyone who clicks on the outdated URL will see a 404 error page. To avoid this, you should always set up a redirect. This is also important in terms of usability.

You should also remember that you can only pass on your link juice (the distribution of backlinks within your website and their strength) if you use a redirect.

How to design a 404 page

If you can't avoid visitors landing on an error page, you can also retain them with well-designed error pages. You can find out how to create a 404 page with WordPress and Visual Composer in the magazine.

What redirects are there?

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 frequently used redirect is the 301 redirect. With this redirect, you indicate to the search engine that it is a permanent redirect. You also pass on the Juice link to the new URL. There are also other types of redirects that you should be aware of:

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

How does a redirect work?

With redirects, a distinction is made between 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 store a corresponding command in the .htaccess file. This is much easier with Raidboxes, more on this later. The commands cause the server to immediately redirect people who call up the corresponding URL to the new URL you have specified.

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. With regard to the search engine optimization of your website, however, you should avoid client-side redirects if possible.

In general, internet users rarely notice redirects. You can therefore use automatic redirects to redirect your URLs without affecting your website visitors. There are various approaches for your WordPress redirects. We would like to introduce you to three of them below.

Set up WordPress redirects manually

If you decide to set up your WordPress redirects manually, log in to your server via your FTP access. Then access the .htaccess file directly. You can find it in the root directory of your WordPress installation. If you don't see it straight away, it may be hidden. In this case, you must first show it via the options of your FTP program.

How to forward individual subpages manually

As soon as you have found the .htaccess file, redirect all links from the outdated URLs to the new ones directly on the spot. To do this, enter the following code, here using the example of a 301 redirect:

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

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

Use the redirect command to inform the server that you have set up a redirect. You then enter the outdated URL directly, followed by the new one. You are therefore redirecting your visitors from your old page to your new page. Test this yourself to see if the entry was created correctly.

How to move an entire domain manually

If you have 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 article.

But be careful: if you make changes to the .htaccess file, there is always a certain risk involved. If you enter a command incorrectly, this can lead to an internal error and ensure that your website is no longer accessible.

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

WordPress Redirect Plugins

When using WordPress plugins, you should always take care not to impair the performance of your website too much. The Raidboxes dashboard is often a much faster way to do this. Let's take a closer look at three of the best-known and best-performing plugins for WordPress redirects:

1. redirection

Probably the best-known plugin for WordPress redirects is Redirection. You can use it to redirect your blog articles and websites to other URLs - in every conceivable way. Should a 404 error occur, Redirection offers you a 404 monitor.

WordPress Redirects Plugin Redirection
The WordPress Redirects plugin Redirection

You also have the option of importing and exporting your data. Once you have installed the plugin, a practical setup wizard takes over and helps you to redirect and rename your pages.

2. simple 301 redirects

Another practical plugin that we think is also suitable for WordPress beginners is Simple 301 Redirects. Once you have installed it, you can find it in WordPress under "Settings". From there, simply navigate to "301 Redirects" to set up and edit your redirects.

WordPress Redirects Plugin Simple 301 Redirects
The Simple 301 Redirects plugin

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://b3193xx5.myraidbox.de/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 somewhat more comprehensive solution that is particularly suitable if you are also looking for an SEO plugin. The free version includes everything you need to get started with optimizing your websites.

However, only in the paid version do you get - among other features - a fairly high-performance redirect manager that helps you to edit your redirects and 404 errors. To do this, you simply enter the outdated or new URLs in the corresponding fields, just like with Simple 301 Redirects and Redirection.

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

In addition, you can also redirect visitors to your website to a URL if you have deleted a page. And you can set up redirections for multiple URLs in one go. The plugin also provides you with a log of all redirects and 404 messages on your website.

Optimize your websites with WordPress SEO

Are you interested in SEO and want to find out more? We'll explain what's important and how you can optimize your texts for search engines with WordPress SEO. We also show you a comparison of 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. You can set these up manually and via plugins. However, there is a third way: If you want to set up a redirect and redirect one URL to another, Raidboxes offers you an integrated function for this in the dashboard .

This means you no longer need a plugin for your redirects and makes your website leaner and faster - redirects via plugins can significantly increase the loading time. With these three simple steps, you can redirect your pages directly via your Box:

1. add your forwarding

  • In the Raidboxes Dashboard, first navigate to the Settings tab of your site
  • Select the item Redirects and click on URL redirects
  • There you click on Add redirects
  • Set your forwarding by filling in the input mask and confirming with Save.
URL Redirects Raidboxes Settings
Create a new redirect

2. insert the relative URL

Both URLs - the source URL and the target URL - refer to the domain of your website. If you set up a redirect, the start page will always redirect to the subpage you have specified.

Important: For this to work, 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. So instead of e. g. https://b3193xx5. myraidbox.de/blog/wordpress-speed-test/ you would enter /blog/wordpress-speed-test/.

External redirects and the redirection of an entire domain are of course exceptions to this rule. In these cases, you enter the absolute URL.

3. save and check your redirect

After you have set up your redirect via your box, you can get yourself a cup of coffee. It may take a moment before your redirect is really active, this also applies to redirect plugins.

Especially if you have set up several redirects at once, you should check carefully after this time whether everything has worked to your satisfaction and you have 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 used for validation and should not be changed.

Conclusion: It also works without a plugin

Of course, it's not every day that you have to create redirects for your WordPress websites. However, when the time comes, for example because you are planning a comprehensive website relaunch including a domain change, you should know what is important. In particular, 301 redirects occur again and again in the life cycle of a website.

If you need to set up WordPress redirects, there are various methods you can use. Raidboxes helps you to keep track of when you need to redirect pages, even without an extra plugin. You can easily edit your redirects via the settings in your box.

Frequently asked questions about WordPress redirects

What are regular expressions?

If you want to redirect entire 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". You do not need regular expressions for individual redirects or the redirection of an entire domain. You can find an overview of many regular expressions on the regex.com website.

Why 301 and 410? Where do the numerical 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. The codes remain the same for HTTP 2 and 3.

What is a hidden redirect?

With a hidden redirect, the actual target URL is not visible in the browser's address bar. As the website operator, you select the displayed URL yourself and thus hide the actual target address.

This is also referred to as "frame forwarding". This procedure has the advantage that pages load particularly quickly. Overall, however, the term has a rather negative connotation, as hidden redirects are also often used when visitors are to be redirected to other pages unnoticed - for example via a malicious script, a change in the DNS settings or code injected into a website.

Your questions about WordPress redirects

What experience do you have with WordPress redirects? What questions do you still have? Let us know in the comments. Would you like to be informed about further articles on WordPress and WooCommerce? Then follow us on LinkedIn, Facebook, Twitter or via our newsletter.

Did you like the article?

With your rating you help us to improve our content even further.

Write a comment

Your e-mail address will not be published. Required fields are marked with *