Tag: redirects

Page Redirects in WordPress or ClassicPress

Page redirects in WordPress or ClassicPress are not the most straightforward topic if you are dealing with it for the first time. Many people have heard of page redirects before but aren’t always sure when you need to use them or how to implement them. These are sometimes needed when maintaining a Wordpress or Woocommerce site.

In the following blog post, you will learn everything you need to know about page redirects (in WordPress and otherwise).

This includes what they are and why they matter when to use what type of redirect, where to apply them, and different ways of correctly implementing page redirects on your WordPress site, so to start lets take a look at what they are.

What Are Page Redirects and Why Do You Need Them?

Page redirects are basically like a send-on notice for the post office. When you move, you can get one of those and any mail that was sent to your old house will automatically be delivered to your new mailing address.

Redirects are the same thing but for web pages only that, instead of letters and parcels, it sends visitors and search spiders to another web address.

Implementing page redirects can be necessary for many reasons:

  1. A mistake in your title and URL that you want to correct
  2. Attempting to add/target a different keyword with your page
  3. The entire permalink structure of your site has changed
  4. Some external link is pointing to the wrong address and you want visitors to find the right page
  5. You want to change parts of your URL, like remove www or switch to HTTPS (or both)
  6. You have moved to an entirely new domain (or merged another site with yours) and want the traffic and SEO value of the old URL to land on the new one

Why Do They Matter?

From the above list, it’s probably already obvious why page redirects are a good idea. Of course, if your entire site moves, you don’t want to start from scratch but instead, benefit from the traffic and links you have already built. However, even if you only change one page, implementing a redirect makes sense.

That’s because having non-existent pages on your site is both bad for visitors and search engine optimization. When someone tries to visit them, they will see a 404 error page. This is not a pleasant experience and usually very annoying (as entertaining as 404 pages can be).

Because of that, search engines are also not a big fan of this kind of error and might punish you for it. Also, you want them to understand your site structure and index it correctly, don’t you? Therefore, it’s a good idea to leave a “this page no longer exists, please have a look over here ” message whenever necessary.

Different Redirect Codes and What They Mean

When talking about redirects, you need to know that there are several different types. These are categorized by the HTTP codes that they have been assigned to, similar to the aforementioned 404 error code for a missing page. However, for redirects, they are all in the 300 category:

  • 301 — This is the most common kind. It means that a page has moved permanently and the new version can from now on be found at another location. This page redirect passes on 90-99 percent of SEO value.
  • 302 — This means a page has moved temporarily. The original URL is currently not available but will come back and you can use the new domain in the meantime. It passes no link value.
  • 303 — Only used for form submissions to stop users from re-submitting when someone uses the browser back button. This is probably not relevant to you unless you are a developer.
  • 307 — The same as a 302 but for HTML 1.1. It means something has been temporarily moved.
  • 308 — The permanent version of the 307.

When to Use What?

Of course, the biggest question is, when to use which type of page redirect?

While there are several options, you usually only need two of them: 301 and 302. Out of those, probably more than 90 percent of the time, you will use a 301. That’s because for the rest (except 303), it’s not always clear how search engines handle them, so you basically stick to those two options.

As for when to use which, much of it you can already understand from what the code tells the browser or search spider, however, here’s a detailed description:

  • 301 — Use this when you are planning on deleting a page and want to point visitors to another relevant URL or when you want to change a page’s permalink (including the domain).
  • 302 — Use this, for example, when making changes to a page that visitors are not supposed to see or when you redirect them to a temporary sales page that will soon turn back to the original. That way, search engines won’t de-index the existing page.

Redirects and Page Speed

While page redirects are great tools for webmasters and marketers, the downside of them is that they can have an effect on page speed.

As you can imagine, they represent an extra step in the page loading process. While that’s not much, in a world where visitors expect page load times mere seconds, it matters.

In addition, page redirects use up crawl budget from search engines, so you can potentially keep them from discovering your whole site by having too many of them. Therefore, here are some important rules for their usage:

  • Avoid redirect chains — This means several hops from an old to a new page. This is especially important when you redirect http to https and www to non-www. These should all resolve to the same domain directly (https://domain.com), not ping pong from one to the next.
  • Don’t redirect links that are in your control — This means, if there is a faulty link inside a menu, inline, or similar, change them manually. Don’t be lazy.
  • Try to correct external links — If the fault is with an incoming link, consider reaching out to the originator and ask them to correct it on their end.

In essence, keep page redirects to a minimum. To see if you have multiple redirects in place, you can use the Redirect Mapper.

How to Find Pages to Redirect and Prepare the Right URLs

So, besides when you do a site or page move, how do you find pages to redirect?

A good place to start is the 404 errors/crawl errors in Google Search Console. You find them under Coverage.

Note that Search Console now only shows 404 errors that threaten your pages from being indexed and not all of them. Therefore, to track down non-existent pages, you can also use a crawler like Screaming Frog. Some of the WordPress plugins below also help you with that, additionally you can take a look at SEMRush, and SEO management tool which is very popular, and used by many experts and beginners alike, you can get a free trial via the link above.

Then, to prepare your page redirects:

  • Get the correct to and from URL — This means to stay consistent in the format. For example, if you are using a trailing slash, do it for both URLs. Also, always redirect to the same website version, meaning your preferred domain including www/non-www, http/https, etc.
  • Get the slug, not the URL — This means /your-page-slug instead of http://yoursite.com/your-page-slug. This way, you make your redirects immune to any changes to the top-level domain such as switching from www to non-ww or from http to https.
  • Redirect to relevant pages — Meaning similar in topic and intent. Don’t just use the homepage or something else, try to anticipate search intent and how you can further serve it.

How to Correctly Implement Page Redirects in WordPress

You have different methods of implementing page redirects in WordPress. Basically, you can either use a plugin or do it (somewhat) manually via .htaccess. Both come with pros and cons:

  • Plugin — Easy to use, nontechnical, however, potentially slower because many of them use wp_redirect, which can cause performance issues.
  • .htaccess — This is a server file and very powerful. For example, you can include directives for using gzip compression in it. Using this is faster because page redirects are set up at the server level, not somewhere above it. However, making a mistake can mess up and/or disable your entire site.

Let’s go over both options:

1. Using a Plugin

You have different plugin options for redirects in WordPress. Among them are:

  • Redirection — This is the most popular solution in the WordPress directory. It can redirect via Core, htaccess, and Nginx server redirects.
  • Simple 301 Redirects — Easy to use, few options, does just what you need and nothing more.
  • Safe Redirect Manager — With this plugin, you can choose which redirect code you want to use (remember what we talked about earlier!). It also only redirects to white-listed hosts for additional security.
  • Easy Redirect Manager — Suitable for 301 and 302 redirects. The plugin is well designed and comes with many options.

All of the plugins work in a very similar way. They provide you with an interface where you can enter a URL to redirect and where it should lead instead.

add page redirect via wordpress plugin

Some of them, like the Redirection plugin, also have additional functionality. For example, this plugin also tracks whenever a visitor lands on a page that doesn’t exist so you can set up appropriate page redirects.

2. Using .htaccess

.htaccess usually resides on your server inside your WordPress installation. You can access it by dialing up via FTP.

filezilla ftp client for wordpress

Be aware though that it is hidden by default, so you might have to switch on the option to show hidden files in your FTP client of choice.

filezilla force show hidden files

The first thing you want to do is download and save it in a safe place so you have a copy of your old file in case something goes wrong. After that, you can edit the existing file (or another local copy) with any text or code editor.

A simple redirect from one page on your site to another can be set up like this:


RewriteEngine On
Redirect 301 /old-blog-url/ /new-blog-url/

If the brackets already exist (as they should when you are using WordPress), all you need is this:

Redirect 301 /old-blog-url/ /new-blog-url/

Just be sure to include it right before the closing bracket. You can also use wildcards in redirects. For example, the code below is used to redirect all visitors from the www to the non-www version of a website.

RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule (.*) http://mydomain.com/$1 [R=301,L]

To explore more options and if you don’t want to write them out manually, there is this useful tool that creates redirect directives for you.

When you are done, save/re-upload and you should be good to go. Be sure to test thoroughly!

Conclusion

Page Redirects in WordPress can be very useful & page redirects have a very important function. They keep visitors and search engines from landing on non-existent pages and are, therefore, a matter of both usability and SEO.

Above, you have learned all you need to know about their usage and how to implement them. You are now officially ready to start sending visitors and search spiders wherever you want.

Note that these aren’t the only ways to implement page redirects. However, they are the most common and recommended. If you want to know less common ways, check this article on CSS Tricks.

What do you use to implement page redirects in WordPress? Any more tools or tips? Share them in the comments section below & if you enjoyed this post, why not check out this article on WordPress Building Trends For 2020!

Post by Xhostcom Wordpress & Digital Services, subscribe to newsletter for more!

Filed under: Development, eCommerce, WordpressTagged with: , ,

Redirects to Make or Break Your Wordpress Migrate

detour-301-redirect-road-ss-1920

Redirects in Wordpress

Correctly redirecting your URLs is one of the most important things you can do to make a site migration go smoothly, but there are clear processes to follow if you want to get it right. Here we break down the rules to successful migration of a Wordpress site.

0g0a7847-1512877.jpg

Redirects are one way that can make or break your site migration. Site migration can mean a lot of different things depending on your context.

Talking about migration, I’m coming from the experience of these primary activities.

CMS moving/URL format

One example of a migration might be taking on a client and they previously used a CMS that had a default kind of URL formatting, and it was dated something.

screen-shot-2019-01-24-at-3-611140.jpg

So it was /2018/May/ and then the post. Then we’re changing the CMS. We have more flexibility with how our pages, our URLs are structured, so we’re going to move it to just /post or something like that. In that way a lot of URLs are going to be moving around because you are changing the way that those URLs are structured.

“Keywordy” naming conventions

Another instance is that sometimes a client will come to us with dated or keywordy URLs, and we want to change this to be a lot cleaner, shorten them where possible, just make them more human-readable.

screen-shot-2019-01-24-at-3-736854.jpg

An example of that would be the client used URLs like /best-plumber-dallas, and we want to change it to something a little bit cleaner, more natural, and not as keywordy, to just /plumbers or something like that. So that can be another example of lots of URLs moving around if we’re taking over a whole site and we’re kind of wanting to do away with those.

Content overhaul

Another example is if we’re doing a complete content overhaul. Maybe the client comes to us and they say, “We’ve been writing content and blogging for a really long time, and we’re not seeing the traffic and the rankings that we want. Can you do a thorough audit of all of our content?” Usually what we notice is that you have maybe even thousands of pages, but only four of them are ranking.

So there are a lot of just redundant pages, pages that are thin and would be stronger together, some pages that just don’t really serve a purpose and we want to just let die. So that’s another example where we would be merging URLs, moving pages around, just letting some drop completely. That’s another example of migrating things around that I’m referring to.

We already know all this? but..

Generally, SEO people know or should know the importance of redirection. If there’s not a redirect, there’s no path to follow to tell the search engine where you’ve moved your page to.

It’s frustrating for users if they click on a link that no longer works, that doesn’t take them to the proper destination, and its a bad user experience. We know it’s important, and we know what it does. It passes link equity. It makes sure people aren’t frustrated. It helps to get the correct page indexed. If you’re like me, you’ve also been in those situations where you have to spend entire days fixing 404s to correct traffic loss or whatever after a migration, or you’re fixing 301s that were maybe done but they were sent to all kinds of weird places.

Mistakes still happen though, even though we know the importance of redirects.

Unclear ownership

Unclear ownership is something that can happen, especially if you’re on a scrappier team, a smaller team and maybe you don’t handle these things very often enough to have a defined process for this. I’ve been in situations where I assumed the tech was going to do it, and the tech assumed that the project assistant was going to do it.

We’re all kind of pointing fingers at each other with no clear ownership, and then the ball gets dropped because no one really knows whose responsibility it is. So don’t drop the ball, just make sure that you designate someone to do it and that they know and you know that that person is going to be handling it.

Deadlines

Another thing is deadlines. Internal and external deadlines can affect this. So one example that encountered pretty often is the client would say, “We really need this project done by next Monday because we’re launching another initiative. We’re doing a TV commercial, and our domain is going to be listed on the TV commercial. So I’d really like this stuff wrapped up when those commercials go live.”

So those kind of external deadlines can affect how quickly we have to work. A lot of times it just gets left off because it is not a very visible thing. If you don’t know the importance of redirects, you might handle things like content and making sure the buttons all work and the template looks nice and things like that, the visible things. Where people assume that redirects, oh, that’s just a backend thing. We can take care of it later. Unfortunately, redirects usually fall into that category if the person doing it doesn’t really know the importance of it.

Non-SEOs handling the redirection

Then another situation that can cause site migration errors and 404s after moving around is non-SEOs handling this. Now you don’t have to be a really experienced SEO usually to handle these types of things. It depends on your CMS and how complicated is the way that you’re implementing your redirects. But sometimes if it’s easy, if your CMS makes redirection easy, it can be treated as like a data entry-type of job, and it can be delegated to someone who maybe doesn’t know the importance of doing all of them or formatting them properly or directing them to the places that they’re supposed to go.

The rules of redirection for site migrations

Now that we kind of know what I’m talking about with migrations and why they kind of sometimes still happen, I’m going to launch into some rules that will hopefully help prevent site migration errors because of failed redirects.

Create one-to-one redirects

Number one, always create one-to-one redirects. This is super important. What I’ve seen sometimes is it could save me tons of time if I just use a wildcard and redirect all of these pages to the homepage or to the blog homepage or something like that. But what that tells Google is that Page A has moved to Page B, whereas that’s not the case. You’re not moving all of these pages to the homepage. They haven’t actually moved there. So it’s an irrelevant redirect, and Google has even said, I think, that they treat those essentially as a soft 404. They don’t even count. So make sure you don’t do that. Make sure you’re always linking URL to its new location, one-to-one every single time for every URL that’s moving.

Watch out for redirect chains

Two, watch out for chains. I think Google says something oddly specific, like watch out for redirect chains, three, no more than five. Just try to limit it as much as possible. By chains, I mean you have URL A, and then you redirect it to B, and then later you decide to move it to a third location. Instead of doing this and going through a middleman, A to B to C, shorten it if you can. Go straight from the source to the destination, A to C.

Watch out for loops

Three, watch out for loops. Similarly what can happen is you redirect position A to URL B to another version C and then back to A. What happens is it’s chasing its tail. It will never resolve, so you’re redirecting it in a loop. So watch out for things like that. One way to check those things I think is a nifty tool, Screaming Frog has a redirect chains report. So you can see if you’re kind of encountering any of those issues after you’ve implemented your redirects.

404 strategically

Number four, 404 strategically. The presence of 404s on your site alone, that is not going to hurt your site’s rankings. It is letting pages die that were ranking and bringing your site traffic that is going to cause issues. Obviously, if a page is 404ing, eventually Google is going to take that out of the index if you don’t redirect it to its new location. If that page was ranking really well, if it was bringing your site traffic, you’re going to lose the benefits of it. If it had links to it, you’re going to lose the benefits of that backlink if it dies.

So if you’re going to 404, just do it strategically. You can let pages die. Like in these situations, maybe you’re just outright deleting a page and it has no new location, nothing relevant to redirect it to. That’s okay. Just know that you’re going to lose any of the benefits that URL was bringing your site.

Prioritize “SEO valuable” URLs

Number five, prioritize “SEO valuable” URLs, and I do that because I prefer to obviously redirect everything that you’re moving, everything that’s legitimately moving.

But because of situations like deadlines and things like that, when we’re down to the wire, I think it’s really important to at least have started out with your most important URLs. So those are URLs that are ranking really well, giving you a lot of good traffic, URLs that you’ve earned links to. So those really SEO valuable URLs, if you have a deadline and you don’t get to finish all of your redirects before this project goes live, at least you have those most critical, most important URLs handled first.

Again, obviously, it’s not ideal, I don’t think in my mind, to save any until after the launch. Obviously, I think it’s best to have them all set up by the time it goes live. But if that’s not the case and you’re getting rushed and you have to launch, at least you will have handled the most important URLs for SEO value.

Test!

Number six, just to end it off, test. I think it’s super important just to monitor these things, because you could think that you have set these all up right, but maybe there were some formatting errors, or maybe you mistakenly redirected something to the wrong place. It is super important just to test. So what you can do, you can do a site:domain.com and just start clicking on all the results that come up and see if any are redirecting to the wrong place, maybe they’re 404ing.

Just checking all of those indexed URLs to make sure that they’re going to a proper new destination.

You should be using SEMRush for analysis, and there is an article here, which gives you more details on this.

But it can also scan your site for errors like 404s namely. So if there are any issues like that, 500 or 400 type errors, SEMRush will catch them and notify you, you can also run other tools in there like the backlinks tool etc to check any of those.

There are plenty of other ways you can test and find errors. But the most important thing to remember is just to do it, just to test and make sure that even once you’ve implemented these things, that you’re checking and making sure that there are no issues after a launch. I would check right after a launch and then a couple of days later, and then just tweak things until you are happy with it.

So now you can do redirects properly! Here’s another link for SEMRush, go get yourself a free copy!

Semrush

If you enjoyed this post, why not check out this article on Mapping SERPS Overlays!

Post by Xhostcom Wordpress & Digital Services, subscribe to newsletter for more!

Filed under: Strategy, WordpressTagged with: , ,