Websites are hardly static, but tend to change for different reasons. For your content to always remain ac­ces­si­ble, or visitors not ending up on an empty page and search engines not ignoring you by mistake, a domain redirect in WordPress is vital. Find out how to redirect a page in WordPress, which options are available, and why redirects are important.

$1 Domain Names – Register yours today!
  • Simple reg­is­tra­tion
  • Premium TLDs at great prices
  • 24/7 personal con­sul­tant included
  • Free privacy pro­tec­tion for eligible domains

Why are WordPress redirects important?

The simplest way to explain just how important a redirect in WordPress can be is to show what would happen without it. If a page or post is no longer online and a user clicks on the cor­re­spond­ing URL or a link, they will land on an error page. This leaves the im­pres­sion that a website owner is un­pro­fes­sion­al and results in higher bounce rates. Pages that cannot be found also have a negative effect on search engine ranking.

Tip

Your dream domain awaits! Register your desired domain quick and easy with IONOS. Wildcard SSL, domain lock, and 2GB email are included.

WordPress 301 redirect

The solution is a 301 redirect for your WordPress site. If a redirect is set up for a page that has either been deleted or moved, the server sends the browser the HTTP status code 301, which causes a new, pre­vi­ous­ly specified page to be displayed. This new page is either the relevant post under a new URL, a similar article, an article overview, or the homepage of your website. The redirects help users find the desired page or stay on your website.

When do you need a redirect in WordPress?

There are several scenarios when a redirect becomes necessary in WordPress. On the one hand, it’s useful when pages are outdated, redundant and thus are deleted. A user who searches for a URL, should not land on an error page. Where content is current, but the re­spec­tive post has been moved to a new URL, a WordPress redirect becomes all the more important. This commonly occurs after you re­struc­ture your website or change the WordPress domain. In that case, redi­rec­tion helps users find the post they are looking for.

But even when a page has neither been deleted nor migrated, sometimes a WordPress redirect is necessary. Namely, if you purchase a SSL cer­tifi­cate and switch your website from HTTP to HTTPS the old URL will no longer be ac­ces­si­ble. In order for the content to remain ac­ces­si­ble, a redirect to the new WordPress site must occur. The con­ver­sion to HTTPS in WordPress is rec­om­mend­ed for all website owners, because the cer­tifi­cate boosts security for visitors and can have a positive effect on your search engine ranking.

Tip

More security for your website: a SSL cer­tifi­cate from IONOS provides optimal pro­tec­tion and improves your Google ranking. Con­ve­nient­ly choose the one that suits you best!

How to manually set up a redirect in WordPress

You have several options to create a WordPress redirect. The most direct option is via the .htaccess file. In principle, this method is not difficult, but you should create a backup first. Since you’re about to modify your website code, any error could result in limited access to your site. Once you have created a backup, the next steps are as follows:

  1. First log in to your web server via FTP.
  2. Open the .htaccess file in the root directory of the WordPress in­stal­la­tion. If you cannot find the file, select the “show hidden files” option.
  3. If you want to redirect the entire domain, e.g. because you’ve swapped to a new URL, enter the following code in the .htaccess file. This will au­to­mat­i­cal­ly redirect all subpages to the new domain.
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?old-website\.com$ [NC]
RewriteRule ^(.*)$ http://www.new-website.com/$1 [R=301,L]

A 301 redirect for a specific WordPress article works in a similar manner. The code is as follows:

redirect /old-content https://new-website.com/new-content
Managed Hosting for WordPress
Create your site with AI, we manage the rest
  • Stress-free, no matter your skill level with easy AI tools
  • Fully cus­tomiz­able with themes and plugins
  • Hassle-free updating and less admin

Setting up a WordPress redirect with a plugin

However, if you have no ex­pe­ri­ence with page code or prefer not to take any risks, you can use a plugin for a WordPress redirect. The simple user interface not only ensures that you can create the redirect to the new WordPress site in just a few clicks, but also helps to prevent errors. Two popular and rec­om­mend­ed plugins are Redi­rec­tion and Simple 301 Redirects. Below we explain how they work, step by step.

Redi­rec­tion

  1. First install the WordPress plugin for redi­rect­ing and activate it.
  2. You can find the plugin in the dashboard under “Tools” and “Redi­rec­tion”.
  3. To redirect to a new WordPress site, enter the old site under “Source URL” and then enter the new site in “Target URL”.
  4. Now click “Add redi­rec­tion”. If a user heads to the old URL, they will au­to­mat­i­cal­ly be redi­rect­ed to the new page, an article overview, or your homepage, depending on which redi­rec­tion you have set up.

Simple 301 Redirects

  1. Once again, first install and activate the Simple 301 Redirects WordPress plugin.
  2. You can find the plugin in “Settings” and “301 Redirects”.
  3. The plugin provides two input options. Under “Request” you enter the old URL, under “Des­ti­na­tion” the new one. Im­por­tant­ly, enter the relative URL without the domain in “Request”. So instead of https://old-website.com/old-content simply enter /old-content.
  4. If you have set up a redirect, an ad­di­tion­al line will au­to­mat­i­cal­ly appear so that you can create as many redirects to new WordPress pages as you want.

Con­clu­sion: WordPress redirects are a must have

To maintain a pro­fes­sion­al web ap­pear­ance, there’s no way of avoiding a WordPress redirect. After all, you want your old content to be ac­ces­si­ble when swapping to a new domain. The easiest way to redirect for WordPress is a plugin. Using popular plugins is very intuitive, and multiple redirects are created quickly and easily.

Tip

How to get started on WordPress with ease? Hosting for WordPress from IONOS has plenty of benefits. Secure up to three domains free of charge, benefit from built-in security features and choose from different plans that suit your online presence!

Go to Main Menu