WordPress Redirections: A Complete Guide for Beginners (2024)

If you’re planning to migrate or update your site, you may need to change some of its URLs. However, this means that users who visit the old links will likely encounter a 404 error, telling them that the page can’t be found. Therefore, you might be wondering how to set up WordPress redirections on your website.

Fortunately, it’s easier than you might think. Once you have a good understanding of the different types of redirects, you can use a plugin to implement them. This way, users who land on the old URLs will be automatically redirected to the new ones. ⚙️

In this post, we’ll take a closer look at WordPress redirections and the types of redirects you can set up. Then, we’ll show you how to create them on your site.

Let’s get started! 🏃

A complete guide 📝 to #WordPress #redirections 🔁 for beginners

What are WordPress redirections?

When a user clicks on a link to a page that no longer exists, they’ll probably get a 404 error. This typically means that the page has been taken offline, or that its URL has changed:

WordPress Redirections: A Complete Guide for Beginners (1)

As a website owner, you might find yourself switching to a new content management system (for instance, from Wix to WordPress). Alternatively, you might decide to migrate to a new host. Either way, the procedure is usually quite straightforward, although some of your pages or links might break in the process.

Even if you’re not planning to migrate your site, you might still need to change your URLs. For example, while optimizing your old posts, you’ll likely have to add new keywords to the links. You might even decide to change the name of your site but keep the same slugs for your pages and posts.

In any of these scenarios, you’ll need to set up WordPress redirections. This way, anyone who comes across your old links will be redirected to the new pages. This includes search engine bots.

Without redirects, your old URLs will be flagged as broken links, which can harm your rankings in search engines. Additionally, users who land on your broken pages will probably be disappointed and exit the site.

Redirects can therefore help you preserve both your rankings and User Experience (UX). However, you should make sure that you set up the right redirections.

Types of redirects

Before we show you how to set up WordPress redirections, let’s briefly go over the different types of redirects. Typically, these include:

  • 301 redirects. These are used for pages that have been permanently moved to a new URL. For example, your about page may have moved from ourwebsite.com/who-we-are to ourwebsite.com/about-us.
  • 302/307 redirects. You can use these redirects when you want to redirect users to a new page temporarily. For example, you might be revamping your portfolio page and want to redirect visitors to the services page until it’s ready.

There are also HTTP to HTTPS redirects. If you’ve recently implemented a Secure Sockets Layer (SSL) certificate on your website, you’ll likely need to redirect the HTTP version of your site to the HTTPS one.

Otherwise, Google could treat them as two separate sites, which could be harmful to your rankings. Plus, you’ll want to make sure that users are directed to the safe version of your site.

How to set up WordPress redirections

Now, let’s look at three different ways to set up WordPress redirections. We’ll start with the easiest methods, which involve using a redirect plugin or SEO tool. Then, we’ll move on to a more difficult way and show you how to create redirections by editing your site’s files.

  1. Install the Redirection plugin
  2. Use an SEO plugin like Yoast SEO
  3. Edit the .htaccess File

1. Install the Redirection plugin 🖱️🔌

Redirection is an easy-to-use plugin that enables you to set up 301 redirects on your site. To install it, navigate to PluginsAdd New in your dashboard, and type in “redirection” in the search bar:

WordPress Redirections: A Complete Guide for Beginners (2)

Then, hit Install Now, followed by Activate:

WordPress Redirections: A Complete Guide for Beginners (3)

Now, go to ToolsRedirection and click on Start Setup. The plugin will then ask you to select a few settings. For example, you can enable Redirection to monitor URL changes and automatically set up redirects:

WordPress Redirections: A Complete Guide for Beginners (4)

Once you’ve completed the setup, you can create your first redirect:

WordPress Redirections: A Complete Guide for Beginners (5)

In the Source URL field, you’ll need to enter the slug of the old URL. For example, if the link is ourwebsite.com/who-we-are, the slug would be /who-we-are:

WordPress Redirections: A Complete Guide for Beginners (6)

In the Target URL field, enter the slug of the new URL. Finally, click on Add Redirect:

WordPress Redirections: A Complete Guide for Beginners (7)

This will be added to your list of redirections:

WordPress Redirections: A Complete Guide for Beginners (8)

That’s it – users will now be directed to the new URL!

2. Use an SEO plugin like Yoast SEO 👨‍💻🔌

Many SEO plugins enable you to set up WordPress redirections. If you’re using Yoast SEO, this feature is available with the premium version.

To set up redirections in Yoast, navigate to Yoast SEORedirects. Then, choose a redirection type.

Yoast gives you the following options:

  • 301 Moved Permanently
  • 302 Found
  • 307 Temporary Redirect
  • 410 Content Deleted
  • 451 Unavailable for Legal Reasons

In the Old URL field, simply enter the slug of the link you want to redirect. Then, enter the new slug in the URL field and hit Add Redirect.

3. Edit the .htaccess File 📝💻️

This method should only be attempted if you’re familiar with your site’s root directory, or you’re comfortable editing WordPress files. Also, you’ll want to make a backup of your site before you proceed, just in case you accidentally delete a file.

To edit your .htaccess file, you’ll need to access your site’s root directory through a File Transfer Protocol (FTP) client, like FileZilla. Alternatively, you can use the File Manager in your hosting account (which is probably easier).

Your site’s root directory will likely be labeled public_html. Inside this folder, you’ll find the .htaccess file:

WordPress Redirections: A Complete Guide for Beginners (9)

Right-click on it and select Edit. This will open the file in a text editor. Here, you’ll need to paste in the following code:

Redirect 301 /old-page.html http://www.mysite.com/new-page.html

Of course, you’ll want to replace those URLs with your own. When you’re ready, save your changes and close the file.

Go to top

Conclusion 🧐

When you move a page to a new URL, you’ll need to set up a 301 redirect (if it’s a permanent change) or a 302/307 redirect (if it’s temporary). This way, anyone who visits the old link will be directed to the new page, thus preventing 404 errors and keeping users engaged. Plus, WordPress redirections can help you preserve your rankings in search engine results.

A complete guide 📝 to #WordPress #redirections 🔁 for beginners

👉 To recap, here are three ways to create WordPress redirections:

  1. Install the Redirection plugin. 🖱️
  2. Use an SEO plugin like Yoast. 👨‍💻
  3. Edit the .htaccess file. 📝

Do you have any questions about setting up WordPress redirections? Let us know in the comments section below!

Yay! 🎉 You made it to the end of the article!

WordPress Redirections: A Complete Guide for Beginners (2024)

FAQs

How to do Redirection in WordPress? ›

How to Redirect a URL in WordPress With a Plugin
  1. Install and activate the Redirection plugin.
  2. In your dashboard, select Tools > Redirection.
  3. On the welcome screen, click Start Setup.
  4. On the next screen, you can choose to allow Redirection to create automatic redirects when you change permalinks.
Apr 1, 2024

What are the redirect rules in WordPress? ›

To add a redirect, in MyKinsta go to WordPress sites > sitename > Redirects. Then click the Add redirect rule button. Add redirect rules in MyKinsta. You can then choose the type of redirect rule you want.

How do I stop too many redirects in WordPress? ›

Fixing ERR_TOO_MANY_REDIRECTS step-by-step
  1. Clear Your Browser Cache.
  2. Delete Cookies For Your Site.
  3. Check WordPress Site URLS.
  4. Check WordPress HTTPS Settings and SSL Certificates (Including Cloudflare)
  5. Reset .htaccess and Check Server-Level Redirects.
  6. Disable WordPress Plugins.
Sep 19, 2023

When to use a 301 redirect? ›

A 301 signals a permanent redirect from one URL to another, meaning all users that request an old URL will be automatically sent to a new URL. A 301 redirect passes all ranking power from the old URL to the new URL, and is most commonly used when a page has been permanently moved or removed from a website.

Does WordPress automatically redirect? ›

The redirects labeled Modified Post are automatic redirects. You can check if the redirect is working by clicking the Check Redirects link. And that's it! You've set up automatic redirects in WordPress.

How do I redirect a website to another domain in WordPress? ›

Visit your site's dashboard. Navigate to Upgrades → Domains (or Hosting → Domains if using WP-Admin). Select “Domain forwarding” Click the “Edit” link next to the domain forwarding you want to update.

How to redirect in WordPress without a plugin? ›

In this instance, you'll need to set up a manual redirect in WordPress without the use of a plugin. Scroll down to the Add new redirection area under Tools > Redirection. Type or paste the URL you wish to redirect from into the Source URL area. Enter or paste the URL you wish to redirect to in the Target URL area.

What is an example of a website redirect? ›

In some cases, a page is redirected to a new URL, and then the new URL is also redirected to another URL. For example, https://site.com/page1/ redirects to https://site.com/page2/, and https://site.com/page2/, in turn, redirects to https://site.com/page3/.

What is WordPress redirect hack? ›

A WordPress redirect hack happens when links are redirected to or from your WordPress website to a malicious destination.

How to solve redirect problem in WordPress? ›

How to Troubleshoot and Fix a Redirect Loop
  1. Delete Your Cookies.
  2. Clear Your WordPress Cache.
  3. Set Up Redirects Correctly.
  4. Disable WordPress Plugins.
  5. Check Third Party Services.
Jan 22, 2024

How to avoid redirects in WordPress? ›

Subscribe to our blog and receive great content just like this delivered straight to your inbox.
  1. Delete Cookies On Your Site. ...
  2. Clear WordPress Site Or Server Cache. ...
  3. Clear Browser Cache. ...
  4. Determine The Cause Of The Redirect Loop. ...
  5. Temporarily Disable WordPress Plugins. ...
  6. Check WordPress Site Settings. ...
  7. Check SSL Certificate.
Nov 15, 2023

Why does WordPress redirect to another site? ›

WordPress hacked redirect happens when malicious code is injected into your website, which then automatically takes your visitors to another website. Usually, the destination website is spammy, with grey market pharmaceutical products, or illegal services.

What is the best redirect for SEO? ›

A 301 redirect is a permanent redirect that passes full link equity (ranking power) to the redirected page. 301 refers to the HTTP status code for this type of redirect. In most instances, the 301 redirect is the best method for implementing redirects on a website.

Should you redirect all 404 pages? ›

While there 's a lot of thought and discussion surrounding how you should handle 404 errors and their impact on SEO, the fact remains that 404 errors are nearly unavoidable. While it 's tempting to simply redirect all 404 errors to the homepage, that 's actually the opposite of what you should be doing.

What is the disadvantage of 301 redirect? ›

You can temporarily redirect the same URL to a new page using a 302 redirect instead. A 301 redirect, on the other hand, will tell Google this is a permanent change which can confuse search engines and lead to lost traffic.

How do I redirect users in WordPress? ›

Install and activate the plugin on your WordPress site. Go to “Users > User Role Editor” in the dashboard. Select the user role you want to edit from the dropdown menu. Scroll down to the “Redirect” section and enter the URL of the page you want to redirect users with this role to after login.

How do I redirect a URL to another URL? ›

Enter the host you want to forward in the Host line (@ for your root domain, i.e., domain.com, www for www.domain.com, * for a wildcard record). In the Value line, enter the destination URL: If needed, you can change the Redirect Type from Unmasked to Masked or Permanent (301) using the drop-down menu: 3.

References

Top Articles
Round to nearest decimal or integer
How to Round Number in Matlab
Texas Roadhouse On Siegen Lane
Lamb Funeral Home Obituaries Columbus Ga
Main Moon Ashland Ohio Menu
How to Book Via Rail Tickets Online?
Atrium Attorney Portal
Casa Grande Az Craigslist
Goodwill Bellingham Donation Hours
Expendables 4 Showtimes Near Cinemark 14 Rockwall And Xd
Bank Of America Operating Hours Today
Wdel News Today
How to find cash from balance sheet?
Ff14 Cloth Softening Powder
Ktbs Payroll Login
Hsclink.health.unm.edu
Pear Shaped Rocsi
Ebony Pyt Twerk
Panic at the disco: Persona 4 Dancing All Night review | Technobubble
Female Same Size Vore Thread
Ohio Road Construction Map
Alamy Contributor Forum
Lee Lucas Jaliyah Dad
Palindromic Sony Console For Short Crossword Clue 6 Letters: Composer Of
Cia Decrypter
Gopher Hockey Forum
Daily Journal Obituary Kankakee
9132976760
Craigslist Chicagoland Area
Sealy Posturepedic Carver 11 Firm
Dead Island 2 im Test: Mit dieser Qualität hätte ich nach neun Jahren nicht gerechnet!
Kleen Krete Concrete Remover 1 Gal Liquid 32110
Calculating R-Value: How To Calculate R-Value? (Formula + Units)
Aerospace Engineering | Graduate Degrees and Requirements
Coverwood Terriers For Sale
Leesburg Regional Medical Center Medical Records
How Much Is 10000 Nickels
Mula Pelada
Solve x^2+2x-24=0 | Microsoft Math Solver
Chalupp's Pizza Taos Menu
Shiny Flower Belinda
General Kearny Inn Motel & Event Center
Craigslist Tools Las Cruces Nm
Babyboo Fashion vouchers, Babyboo Fashion promo codes, Babyboo Fashion discount codes, coupons, deals, offers
Tamusso
4Myhr Mhub
Cb2 South Coast Plaza
Saratoga Otb Results
Its Arrival May Be Signaled By A Ding
Santa On Rakuten Commercial
Finastra Gfx
Choices’ summer movie preview
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 6229

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.