Redirection plugins are easier and faster to do a redirect, but when is it not advisable to use them?
Tim: I was going to ask why not a redirection plugin?
David: Redirection plugins. I do use them. Mostly because they’re easier for me to access because sometimes clients can’t or don’t give me FTP access, and frankly, with manage host, you can’t even get FTP access anymore. But redirects through the server are faster, and they don’t have the weight of the database queries. Because if you put it in a WordPress redirect plugin, then it has to query the database before it sets the redirect. And that’s fast to humans, but it’s slow to a computer.
David: Plus, you can do things like set up regular expressions. Some of the plugins will allow you to use regular expressions, but you can do more of a catch-all with that. Now, I will warn you, and I think I’ve told this story. My first SEO mistake was not standing up to my boss when I discovered that he made a regular expression redirect error. Yeah, so be careful with redirections and regular expressions because it took the website out of Google because Google couldn’t access a large section of the website because of the regular expression.
Tim: Regular expressions, I don’t know what you mean by that.
David: Okay, a regular expression is a… I’m trying not to use technical jargon. It’s a string of characters that creates a template that should match search string. So, it’s a fancy way of saying, I want you to match this phrase. But, for instance, I don’t know what the word might be in the middle. So, I’m going to put some variables in there. And so regular expressions allow you to say, okay, I’m not just matching this literally, but I’m going to, there’s a variation .co, sometimes there’s an “m” sometimes there’s not an “m.” And so, we can format the string in a way where regular expression interprets that to say, oh, I know what they mean. There might be an “m,” there might not be an “m” here. And so, it can look for that and deal with that appropriately. It’s used in almost every programming language as a way of matching lines of text. Or, in this case, we’re matching URLs because it’s just a line of text. And so, we can set up a rule to say if a URL matches this line of text, by the regular expression way we state it, then do something with it. That’s a regular expression. It’s hard to describe. You’ve probably seen them, at least in forms.
David: Does that help?
Tim: I think so. A regular expression versus what’s the…
David: So, let’s say that a wild card, like sometimes some systems let you put an asterisk to replace a letter that you don’t know the letter. Or… Gosh, I’m really having a hard time. Regular expressions are pretty standard. Now that makes it more complicated, and there are different variations on regular expressions. But okay, don’t go into the weeds, David, don’t go in the weeds. So, I’m really having a hard time. Hey, Google it.
Tim: Yeah, that’s what I was thinking. No, I totally get it. I mean, I totally locked up the other day when I was talking to a client. I had a complete brain fart, and I couldn’t remember anything that I was talking about. So, you’re doing fine. But I was going to say I’m coming from just, you know, using redirection plugins. So, I know what a 301 is, and I know what a 302 is, and all that, but the regular expression, I guess, writing the code to do the redirection, is just not in my knowledge base. So, I’ll have to read up on that.
David: Yeah, and like I said, a lot of managed hosts don’t even allow you to do this anymore. So, like with the WP engine, you have to go to tech support to set up redirects like this.
David: Which can be good and bad. Number one, they will make sure it works. Right. The bad is, they don’t know what works means to you. And if it does something, they’re going to assume it’s right, and they could be totally wrong. Well, the good is it keeps clients out of screwing around with the stuff that they shouldn’t be messing with. Because like I said, this is really powerful stuff, but the bad is like having to rely upon a plugin to do it in the overhead. Some of the plugins are really bad where they will keep a database of every 404 error on your website. And that could get really, really, really large and really bog down your website. So, the one I like is called Simple 301 Redirects, and it doesn’t even have a database keeping track of 404 errors. Like, I don’t want that. Just do the redirects. But again, it’s slower, and in some more advanced cases, you can’t do a full redirect because it has to go through WordPress for that plugin to work. But sometimes, you want to bypass WordPress, but that’s probably more advanced.
Tim: Yeah, I would imagine that like changing the URL, I wouldn’t want to use a plugin for that for sure. Right? Like that’s something you really need to address at the server level, is what you’re saying too. But if I if a blog post for deleted or something like that, using a plugin redirect wouldn’t be too awful, I guess.
David: The lesson is don’t change URLs unless you really, really have to.
Tim: Yeah, right.
David: If you accidentally have a cuss word in the URL or something like terrible like, oh my gosh, we’re going to get sued for having this blog post on us. Okay, then maybe, but anything you could do to avoid having to change the URL avoids having to have a redirect, which does make your life easy. So being really cautious about changing URLs is kind of the lesson, and think ahead with URLs to make sure that we can live with it as long as possible. So, for instance, I have a client, and they have a blog, but the blog was kind of confusing, and it says “untitled,” and it says “untitled” in the URL. So, I changed that, but now all the blog posts have a different URL. So, I had to make a decision. Is the benefit of change in the URL worth it for the loss of having to add a bunch of redirects? In this case, they had four blog posts. So, it’s like a no-brainer done. But I had to think ahead so that later I’m still happy with it because I don’t want to change this in three months when I’ve written a bunch of blog posts for this client.
SEO seems hard- you have to keep up with all the changes and weed through contradictory advice. This is frustrating and overwhelming. Curious Ants will teach you SEO while bringing your website more traffic and customers- because you’ll learn SEO while doing it.