The Innocent Bystander‘s SEO Guide to Redirects

301 Redirect Sign along the Highway

What’s one thing that stays completely under the radar of business owners yet remains a common cause of SEO blunders, stealthily draining rankings and revenue?

Redirects

Have you witnessed an event that caused a loss in traffic during a site move or redesign? As an innocent bystander, you suspect the accident was related to redirects. It’s time to put yourself in the driver’s seat so you can avoid redirect mishaps and learn exactly how to make redirects work every single time.

What Are Redirects?

Imagine this situation: ravenous after a day of hard work at the office, you decide to check out a newly-opened restaurant near your business.

As you approach the entrance, you notice a sign on the door warning guests about the ongoing construction of the façade, ushering them to the makeshift entryway just around the corner.

In the same way the savvy restaurant owner retains clientele by redirecting them to the temporary entrance, so can you keep your own customer base by doing the same thing with your web pages.

Simply put, a redirect is a technique that allows you to forward users and robots from the page that has been requested to another URL.

While the definition sounds deceptively simple, working with redirects is an art form  that requires careful technical knowledge to avoid wreaking havoc on the site—which is why placing an amateur in charge of your redirects ain’t smart.

Let me give you a basic example. Conventionally, any website has www and non-www versions of every single URL:

www.yoursite.com/books

yoursite.com/books

Search engines treat each as a separate URL leading to separate pages, effectively making you guilty of putting out duplicate content.

Which of the two should search engines rank? Fortunately, you can merge the two versions into one using a redirect.

For sites hosted on servers running Apache—the most popular web server out there—these lines of code added to .htaccess (the file that allows adding custom commands which override the default server settings) will do the work:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^leverable.com$ [NC]
RewriteRule ^(.*)$ https://www.leverable.com/$1 [L,R=301,NC]

Technical SEO does not forgive mistakes. You either know what you are doing or play Russian roulette with it. And with that approach, your business website’s SEO performance is at stake.

How Do Redirects Affect SEO?

At this point, you may be thinking to yourself, “But what’s in it for my SEO campaign?”

Basically, it all boils down to two things: user experience and crawlability in the eyes of search engines.

  • On the user side, redirects help you gain full control over the content shown to your visitors. For instance, you can display different versions of the site based on the user’s location or device.
  • On the search engine side, redirects help search bots understand your site structure as well as classify and prioritize pages, including whether to index or de-index any given page.

However, if you take a closer look, redirects affect several factors that wind up impacting your SEO efforts.

Rankings and Traffic

Redirects can be a double-edged sword. On the one hand, they are a powerful tool for shaping your site structure.

On the other hand, wrong or poorly set redirects greatly confuse search bots and disrupt your search visibility, skewing the way search engines view your site.

The implications can be devastating: important pages get de-indexed while the useless ones make it to the SERPs as link equity is misplaced.

Also, it has been said that redirects caused a loss of PageRank to prevent SEOs from abusing them.

Depending on the redirect type (more on that later) and how closely related the pages are, not all of the original page’s SEO value was passed to the destination URL.

You need to set up the redirect from one page to the same or similar page to make it count. I often hear people talk about redirecting as a magic bullet, even if it’s pointing to a nonrelevant page. That’s a mistake I’ll admit to making in the past.

Here’s what Google’s John Mueller has to say:

“A redirect from one page to an entirely different page will result in no PageRank being passed and will be considered a soft 404.”

So, choose wisely.

User Experience

If a bad redirect makes the user land at an unexpected destination, they will most likely close the page. As they should.

How about being redirected to the home page instead of the category you clicked on? Or being offered the wrong language? Or the wrong page?

In such cases, you lose potential customers, chipping away at the conversion rate.

Load Time

When redirects stack on top on each other (aka a redirect chain), it takes longer for the server to process the requests, slowing down the load speed of your site. Google found that just half a second increase in load time caused its traffic and revenue to drop by a whopping 20%.

Sure, you may not lose out as much as Google, but make no doubt, higher latency will take some wind out of your sales (pun intended).

Crawl Budget

A crawl budget is the number of URLs a search engine is ready to crawl on your site at any given time span.

By wasting your crawl budget on bad redirects, you deprive the other pages of attention from search bots, leading to indexing and re-indexing issues.

Revenue

With all that said, redirects may be bleeding your revenue, completely unbeknownst to you. I’ve seen this happen most often with ecommerce sites that remove a product page and forget to redirect it. The page remains a 404 until finally being de-indexed and forgotten by search engines. When you discover the error later, you can rebuild and redirect the page. But by then, loss of links and page signals mean it will be an uphill climb to regain what you lost.

When to Use Redirects?

Redirects have various applications when it comes to altering site structure, unifying  URLs, channeling traffic and managing content.

Common situations which cannot be solved without redirects are:

1. Consolidating two or more websites into one

Whenever you happen to merge two or more sites into one, permanent redirects are used to pass as much traffic, PageRank, and link equity as possible.

2. Site redesign

Redirects are needed in situations involving anything that entails drastic structural changes in site architecture, which is a typical side effect of rebranding, redesign, or a site revamp.

When you go through a site redesign, redirecting helps patch up the gaps to cushion the blow to the site’s search visibility.

3. Moving domains

Whether it’s changing the domain name or migrating just a part of your site—for instance, if you decide to move your blog to a separate domain—there is no way around dealing with redirects.

But in most cases, the URLs stay the same except for the new domain. Interestingly, Google even has a tool for doing moves in Search Console, the Change of Address Tool, to make the transition as painless as possible.

4. Changing the links in your site

This is a common scenario when the URL structure has been modified. In this case, you want to smoothly forward all users landing on the old pages to the new URLs using permanent redirects.

5. Removing pages

You may remove a page but not the external links leading to it. By redirecting those users to a similar page, you can retain some of the traffic that would have been otherwise lost.

6. Switching from HTTP to HTTPS

As search engines enforce higher security standards, Google will not hesitate to punish sites without SSL certificates in place. To solve the issue, SEOs set permanent redirects to automatically channel users to the safer HTTPS version.

7. Consolidating duplicate URLs

Similar to www and non-www domains, whether it’s redirecting uppercase to lowercase URLs, adding or removing a trailing slash, or setting up IP canonicalization, your site may have a myriad of pages that can be accessed from different URLs.

All that is undermining your SEO efforts and must be tackled with permanent redirects.

8. Geotargeting and device targeting

Again, if your site has both desktop and mobile versions or supports multiple languages, special redirects aid in serving the right version of the site to the user.

9. Seasonal pages

Commonly used by ecommerce sites, you might want to temporarily channel some traffic to pages created for seasonal events.

10. Split URL testing

Delving deeper into advanced SEO practices, you can use redirects to set up A/B tests to analyze the performance of separate pages against each other.

And we haven’t even scratched the surface of what redirects are capable of.

Types of Redirects

Man standing by a 302 redirect sign

Before we get started, here’s a quick crash course on how the Web works.

Whenever you type “facebook.com”—or any URL for that matter—into the address bar, your Web browser (the client) is making a request to Facebook (the server) using the HTTP protocol—basically, the standardized language for client/server communication.

In turn, the server responds with a certain three-digit HTTP status code, giving the client feedback on whether the request was a success (2xx status codes), a failure (4xx—client errors; 5xx—server errors), or something else (for instance, 1xx status codes tell you that the server is still thinking through the request).

This perpetual ping-pong relationship lasts as long as you keep interacting with the site. Essentially, this is the Internet as we know it.

With that in mind, you might assume there are only two ways you can go about redirecting: either using server-side or client-side redirects—depending on where a redirect takes place. And you would be totally right.

Also, there’s a distinction between permanent and temporary redirects. The names are pretty self-explanatory. From an SEO perspective, however, you normally opt for permanent redirects whenever possible to preserve the link equity.

Let’s talk about them more in detail.

Server-Side Redirects

A server-side redirect occurs on the server level whenever a request that meets a certain criterion has been made. By the way, all the status codes within the 3xx block stand for redirects.

We could talk about each for hours, but instead, I will stop exclusively on the redirects that have the most impact on your SEO.

If possible, always stick to server-side redirects as the most reliable option.

301: Moved Permanently

A 301 is the go-to redirect when you need to permanently forward users from one page to another URL. Whenever the changes are here to stay, the 301 is your best buddy for making a smooth transition.

Google chimes in with a comment:

If you need to change the URL of a page as it is shown in search engine results, we recommend that you use a server-side 301 redirect. This is the best way to ensure that users and search engines are directed to the correct page.

The original page should get de-indexed (it doesn’t always) while the destination URL takes its spot in the SERP instead, inheriting the PageRank and link equity—with some minor losses, again, if the pages are identical or closely related.

Keep in mind that 301 redirects preserve the most PageRank and link equity.

302: Moved Temporarily / Found

302 redirects are used to signify that a given web page has been temporarily moved to the destination URL.

While the 302 works the same as its twin brother, a 301 redirect—even the PageRank is preserved—you should only think of it as a Band-Aid, not a fundamental solution.

However, when it comes to 302 redirects, both the original and destination URLs can make it to the SERPs, which may cause a host of indexing issues.

For that reason, most of the time using a 302 redirect is a bad idea, except for short-term changes such as running A/B tests when you need to manually send a bunch of users to another page.

Here is what Google has to say on 302s:

If you’re running an A/B test that redirects users from the original URL to a variation URL, use a 302 (temporary) redirect, not a 301 (permanent) redirect. This tells search engines that this redirect is temporary—it will only be in place as long as you’re running the experiment—and that they should keep the original URL in their index rather than replacing it with the target of the redirect (the test page).”

304: Not Modified

304 redirects are a godsend for huge sites as they allow the opportunity to greatly optimize your crawl budget.

This redirect is triggered by a special server request containing the “If-Modified-Since” header and returned whenever a web page has not been modified since it was last accessed by the user or bot.

If the file has remained unaltered, the cached version of the page will be served instead, making search bots move on to another URL.

The SEO implications? You free up the crawl budget for bots to explore the pages on your site that actually need that.

307 Temporary Redirect and 308 Permanent Redirect

These are the slightly modified clones of the 302 and 301, introduced in HTTP/1.1. The difference? For both 307 and 308 redirects, the request method remains the same—POST for POST requests, GET for GET requests.

In normal human language, these give you a bit more flexibility and are generally applied to complex websites.

Client-Side Redirects

If you don’t have access to the web server, you can manually set a redirect using client-side alternatives executed by your web browser.

However, such redirects can cause compatibility issues and do not give any cues to search bots regarding the nature and purpose of redirection. That’s why you would usually be better off gravitating toward any server-side solution.

Here is a quick overview of client-side redirects:

Meta Content Refresh

Place this HTML meta tag into the header section of a page (the space between <head> and </head>) to trigger a redirect:

<meta http-equiv=”refresh” content=”0; URL=http://www.yoursite.com/new-page”>

The meta tag will immediately forward the user or bot to the destination URL. The zero represents the delay in seconds before a redirect occurs.

However, Google recommends you stay away from meta refresh:

This tag sends the user to a new URL after a certain amount of time, and is sometimes used as a simple form of redirection. However, it is not supported by all browsers and can be confusing to the user. The W3C recommends that this tag not be used (emphasis mine). We recommend using a server-side 301 redirect instead.

JavaScript Redirects

As the name implies, JavaScript statements can be utilized as a means to channel users and bots to another page as well.

Again, here is what Google has to say on JavaScript redirects—ironically, the page is titled “Sneaky redirects”:

Using JavaScript to redirect users can be a legitimate practice. For example, if you redirect users to an internal page once they’re logged in, you can use JavaScript to do so. When examining JavaScript or other redirect methods to ensure your site adheres to our guidelines, consider the intent. Keep in mind that 301 redirects are best when moving your site, but you could use a JavaScript redirect for this purpose if you don’t have access to your website’s server.

PHP Redirects

This is another crude way of redirecting. I wouldn’t advise it to anyone, but sometimes it may be the only way around. This code line pasted into a PHP file will trigger a redirect:

<?php header(“Location: https://www.yournewurl.com/”, true, 301); exit(); ?>

In fact, once I had to set aside conventional wisdom and turn to PHP redirects because the client site’s URLs had spaces between them, rendering normal server-side redirects useless. So I had to add a snippet of code to a static file to make it redirect.

Whew, that was a pretty intense post!

To wrap it up, here are the key takeaways:

  • Redirects—though staying in the shadows—affect a whole host of key SEO metrics: rankings and traffic, user experience, load time, and crawl budget.
  • Redirects are pretty much the nuclear bomb of the SEO world, meaning you should never allow anyone except a seasoned SEO consultant to tinker them whenever your site undergoes any structural or URL changes.
  • If your site has never been SEO audited, redirects may end up being the invisible SEO black hole, devouring your rankings and revenue without you even being aware of that.
  • Whenever possible, stick to server-side redirects, preferably 301s.

Related SEO Blogs

One Response

Leave a Reply

Your email address will not be published. Required fields are marked *