Category: SEO

Redirection

Redirection is the process of forwarding one URL to a different URL. There are three main kinds of redirects: 301, 302, and meta refresh.

Types of Redirects
  • 301, “Moved Permanently”—recommended for SEO
  • 302, “Found” or “Moved Temporarily”
  • Meta Refresh

What is a Redirect?

A redirect is a way to send both users and search engines to a different URL from the one they originally requested. Below are descriptions of some of the commonly used types of redirects.

301 Moved Permanently

A 301 redirect is a permanent redirect which passes between 90-99% of link juice (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.

302 Found (HTTP 1.1) / Moved Temporarily (HTTP 1.0)

A 302 redirect is a temporary redirect. It passes 0% of link juice (ranking power) and, in most cases, should not be used. The Internet runs on a protocol called HyperText Transfer Protocol (HTTP) which dictates how URLs work. It has two major versions, 1.0 and 1.1. In the first version, 302 referred to the status code “Moved Temporarily.” This was changed in version 1.1 to mean “Found.”

307 Moved Temporarily (HTTP 1.1 Only)

A 307 redirect is the HTTP 1.1 successor of the 302 redirect. While the major crawlers will treat it like a 302 in some cases, it is best to use a 301 for almost all cases. The exception to this is when content is really moved only temporarily (such as during maintenance) AND the server has already been identified by the search engines as 1.1 compatible. Since it’s essentially impossible to determine whether or not the search engines have identified a page as compatible, it is generally best to use a 302 redirect for content that has been temporarily moved.

Meta Refresh

Meta refreshes are a type of redirect executed on the page level rather than the server level. They are usually slower, and not a recommended SEO technique. They are most commonly associated with a five-second countdown with the text “If you are not redirected in five seconds, click here.” Meta refreshes do pass some link juice, but are not recommended as an SEO tactic due to poor usability and the loss of link juice passed.

SEO Best Practice

It is common practice to redirect one URL to another. When doing this, it is critical to observe best practices in order to maintain SEO value.

The first common example of this takes place with a simple scenario: a URL that needs to redirect to another address permanently.

Reidrect Illustration

There are multiple options for doing this, but in general, the 301 redirect is preferable for both users and search engines. Serving a 301 indicates to both browsers and search engine bots that the page has moved permanently. Search engines interpret this to mean that not only has the page changed location, but that the content—or an updated version of it—can be found at the new URL. The engines will carry any link weighting from the original page to the new URL, as below:

Google 301 redirect

Be aware that when moving a page from one URL to another, the search engines will take some time to discover the 301, recognize it, and credit the new page with the rankings and trust of its predecessor. This process can be lengthier if search engine spiders rarely visit the given web page, or if the new URL doesn’t properly resolve.

Other options for redirection, like 302s and meta refreshes, are poor substitutes, as they generally will not pass the rankings and search engine value like a 301 redirect will. The only time these redirects are good alternatives is if a webmaster purposefully doesn’t want to pass link juice from the old page to the new.

Transferring content becomes more complex when an entire site changes its domain or when content moves from one domain to another. Due to abuse by spammers and suspicion by the search engines, 301s between domains sometimes require more time to be properly spidered and counted. For more on moving sites, see Achieving an SEO-Friendly Domain Migration: The Infographic.

301 Redirects in Apache

Problem:

Back when we launched our first website, seomoz.org, it was hosted at www.socengine.com/seo/ rather than on its own domain. When the original developers were moving seomoz.org to its own dedicated server, they wanted it to be accessed as its own domain rather than as a subdirectory of socengine.com. They needed visitors accessing anything in www.socengine.com/seo/ to be redirected to www.seomoz.org. The redirection had to accommodate several file and folder name changes and had to be done with 301 redirects in order to be search engine-friendly. They also needed to forward http://seomoz.org, too, for aesthetic purposes and to avoid canonicalization errors.

Solution:

The simplest approach to do this would have been to add 301 redirects to the PHP code that powered seomoz.org using PHP’s header function. Utilizing the power of the apache module mod_rewrite, however, the developers realized they could match specific patterns for entire folders and redirect them to their new URLs without having to go through every PHP script.

Installation:

In order for this to work, a web server needs to have the apache module mod_rewrite installed.

Most apache installations will have mod_rewrite installed by default. SEOmoz’s original server ran the Linux distribution FreeBSD and mod_rewrite was included by default. To check to see if the module is installed, a developer can verify it is working by adding the following line to the apache configuration file or to an applicable .htaccess file:

RewriteEngine On
Context

The mod_rewrite module operates in per-server context or in per-directory context.

The per-server context requires that a developer must edit the apache configuration file, httpd.conf. The per-directory context uses .htaccess files that exist in each folder a user wants to configure. If a webmaster can not access httpd.conf, they will have to use .htaccess files.

Regular Expressions (aka Regexes)

From wikipedia.org:

A regular expression is a string that describes or matches a set of strings, according to certain syntax rules. Regular expressions are used by many text editors and utilities to search and manipulate bodies of text based on certain patterns.

Regular expressions are a valuable skill to learn for both programmers and systems administrators. To redirect URLs according to the examples in this document, it is important to understand the basics of using regexes. The following is a list of the characters and operators that are used in the regexes described in this document:

  • . Period–matches anything
  • * Asterisk–matches zero or more of the preceding characters
  • + Plus sign–matches one or more of the preceding character
  • ( ) Parenthesis–enclosing a value in parenthesis will store what was matched in a variable to be used later; this is also referred to as a back-reference
  • (value1|value2)–enclosing two or more values in parenthesis and separating them with a pipe character is the equivalent of saying: “matching value1 OR value2”

Redirecting Specific Files and Folders from one Domain to Another

The original developers at Moz needed redirection from the old server to the new one with the filenames preserved.

Example

Redirect: http://www.socengine.com/seo/somefile.php To: /somefile.php

Solution

Add the following directive to the applicable file on socengine.com’s server:

RedirectMatch 301 /seo/(.*) /$1
Explanation

The regular expression /seo/(.*) tells apache to match the seo folder followed by zero or more of any characters. Surrounding the .* in parenthesis tells apache to save the matched string as a back-reference. This back-reference is placed at the end of the URL that was directed to, in this case, $1.

Redirecting Canonical Hostnames

The original developers at Moz needed to redirect any requests that do not start with www.seomoz.org to make sure they included the www. They did this not only because it looks better, but to avoid common canonicalization errors.

Redirect: http://seomoz.org/
To: http://www.seomoz.org/

Redirect: http://mail.seomoz.org/
To: http://www.seomoz.org

Redirect: http://seomoz.org/somefile.php
To: http://www.seomoz.org/somefile.php

Solution

Add the following directive:

RewriteCond %{HTTP_HOST} *!^www*.seomoz\.org [NC]
RewriteRule (.*) http://www.seomoz.org/$1 [L,R=301]
Explanation

This directive tells apache to examine the host the visitor is accessing, and if it does not equal www.seomoz.org, to redirect to www.seomoz.org. The exclamation point (!) in front of www.seomoz.org negates the comparison, saying, “If the host IS NOT www.seomoz.org, then perform RewriteRule.” In our case RewriteRule redirects them to www.seomoz.org while preserving the exact file they were accessing in a back-reference.

Redirecting Without Preserving the Filename

Several files that existed on the old server were no long present on the new server. Instead of preserving the file names in the redirection (which would result in a 404 not found error on the new server), the old files needed to be redirected to the root URL of the new domain.

Redirect: http://www.socengine.com/seo/someoldfile.php
To: http://www.seomoz.org/

Solution:

Add the following directive:

RedirectMatch 301 /seo/someoldfile.php http://www.seomoz.org
Explanation:

Omitting any parenthesis, all requests for /seo/someoldfile.php should redirect to the root URL of http://www.seomoz.org

Redirecting the GET String

Some of the PHP scripts had different names but the GET string stayed the same. The Moz developers needed to redirect the visitors to the new PHP scripts while preserving these GET strings. The GET string is the set of characters that come after a filename in the URL and are used to pass data to a web page. An example of a GET string in the URL /myfile.php?this=that&foo=bar would be “?this=that&foo=bar.”

Redirect: http://www.socengine.com/seo/categorydetail.php?CAT_ID=12345
To: http://www.seomoz.org/artcat.php?CAT_ID=12345

Solution:

Add the following directive:

RedirectMatch 301 /seo/categorydetail.php(.*) http://www.seomoz.org/artcat.php$1
Explanation:

Once again the regular expression (.*) tells apache to match zero or more of any character and save it as the back-reference $1. Since there is a $1 after /seo/categorydetail.php, it will now redirect the get string to this new PHP file.

Redirecting While Changing File Extensions

In the original scenario there was a folder of files on the old server that were mixed HTML and PHP. On the new server these files were all PHP and needed redirect logic to change the old URLs to this new extension.

Redirect: http://www.socengine.com/seo/guide/anyfile.html
To: http://www.seomoz.org/articles/anyfile.php

Redirect: http://www.socengine.com/seo/guide/anyfile2.php
To: http://www.seomoz.org/articles/anyfile2.php

Solution:

Add the following directive:

RedirectMatch 301 /seo/guide/(.*)\.(php|html) http://www.seomoz.org/articles/$1.php
Explanation:

(*.) matches zero or more of any character and saves it as the back-reference $1. \.(php|html) tells apache to match a period followed by either “php” or “html” and saves it as the back-reference $2 (although this isn’t used in this example). Notice the escaped period with a backslash. This is to ensure apache does not interpret the period as meaning “any character” but rather as an actual period. Enclosing “php” and “html” in parenthesis and separating them with a pipe “|” character means to match either one of the values. So if it were to say (php|html|css|js|jpg|gif) the regex would match any of the files with the extensions php, html, css, js, jpg, or gif.

Conclusion

By harnessing the power of mod_rewrite and a little regular expression magic the original developers at Moz developed a set of simple rules for redirecting web pages. By using 301 redirects, they did this in a way that was search engine–friendly.

  • MozBar
    The MozBar SEO toolbar lets you see relevant metrics in your browser as you surf the web.
  • Open Site Explorer
    Open Site Explorer is a free tool that gives webmasters the ability to analyze up to 10,000 links to any site or page on the web via the Mozscape web index.

External Resources

Credit to: MOZ.com for this great explanation of redirection types.

Article written by: Dmitry Dragilev – Entrepreneur.com

To many people, SEO is a minefield of misinformation and conflicting advice.

Trust me, I’ve been there. When I Googled “SEO” for the first time, I was quickly overwhelmed with a mountain of anecdotes, case studies and “best practices”. I picked up a few tips, but for the most part, I couldn’t make heads or tails of what I read.

After years of in-the-trenches online marketing and PR work, I eventually put the pieces of the puzzles together. But I’m no SEO guru. In fact, most of my best SEO successes have come from old-school PR. That’s because, when you do it right, PR equates to link building, or the practice of building backlinks to your site to get higher rankings in search engines.

But over the last few months I’ve read that “link building is dead” and that “Google doesn’t care about keywords anymore.” Instead, the search engine is supposedly more concerned with high-quality content, schema markup and social media shares.. I’ve been busy with my startup, so I haven’t had time to keep up with the latest trends in the SEO world.

Fortunately, someone else recently took the time to make sense of the topsy-turvy SEO landscape. Brian Dean and a team of data partners at Backlinko recently analyzed 1 million Google results to see which ranking factors are important for SEO in 2016.

Related: The Quick SEO Guide You Need for Your Website

Here’s what they found:

Backlinks are still (very) important

Of the 20-ish ranking factors Dean looked at, he found that backlinks are still the no. 1 most important ranking signal that Google uses. But not just any backlinks. This study found that you need backlinks from a bunch of different domains.

Image Credit: Backlinko

In other words, if you get 100 backlinks from the same domain, it’s not going to blast you to the top of Google. But if you get 100 backlinks from 100 different domains, you’re in business.

The question is: how do you get these backlinks? Spam 10,000 site with blog comments. Just kidding 🙂

In my opinion, the best links you can get are contextual mentions from authoritative media outlets.

Not only are these links highly-valued by Google, but they can bring in a boatload of traffic to boot. Here’s a guide I wrote that will help you get links using PR.

More bounces equal lower rankings

This study also found that bounces aren’t just bad for your bottom line: they can throw a monkey wrench into your SEO efforts.

Using data from SimilarWeb, the study found that sites with a high bounce rate tended to rank lower in Google than sites with a low bounce rate.

Image Credit: Backlinko

This data suggests bounce rates may cause lower rankings.

After all, if people bounce off of your site like a trampoline, it sends a pretty clear message to Google that people don’t like reading your content. So it makes sense that Google may downrank sites with lots of bounces.

However, Dean mentions in the report that a low bounce rate might be a byproduct of excellent content in general. In other words, if you write a kick-butt article, people are going to stick around longer.

How do you decrease your bounce rate, you ask? It’s not rocket science. On my blog I just make sure that my content is above the fold — and that the first few sentences draw people in. If you can hook them quickly, they’re significantly more likely to view another page.

Another way you can improve bounce rate is to break your content up into small chunks. In my experience, walls of text make users run for their lives. But when you break your content into two to three sentence paragraphs it becomes much easier to digest.

Bottom line? Spend some time improving your bounce rate. It definitely won’t hurt your SEO (or conversions), so it makes sense to invest some time in improving it.

Long-form content ranks better (surprise, surprise).

“People online have short attention spans.”

How many times have you read that?

Yes, there are certain people who live and breathe tl;dr (i.e. too long, didn’t read). But you don’t want to architect your content marketing strategy around this group. Think about it: if you found a 3,000 word article on the topic of “why you’re so awesome,” would you skim it? Of course not! You’d read every word.

While that’s an extreme example, it goes to show that people ARE willing to read long-form content. Just look at the runaway success of waitbuywhy.com, which publishes posts that clock in at more than 10,000 words!.

Related: You Don’t Need Much Cash to Implement These 5 Essential Marketing Strategies

And the study points out that not only do people like reading long-form content, but it tends to rank better in Google:

Image Credit: Backlinko

According to Dean’s data, the average first page results in Google boasts 1,890 words. That’s a helluva lot more than your average 400-word blog post.

Obviously, if you use long-form, you need to write well.

So when you can combine compelling writing with long-form content you have a one-two punch that’s very powerful.

In fact, other studies (like this one by BuzzSumo) found that longer content tended to get more shares on social media:

Image Credit: Backlinko

And I’ve found the same phenomenon on my blog. When I look at the content that brought in the most shares (and get the most Google traffic), they tend to be more than 2,000 words:

Does the increase in social shares explain the association between long-form content and rankings?

It’s impossible to say from this study, because it only looked at correlations.

Like with bounce rate, publishing long-form content definitely won’t hurt you. And it will probably help. So give it a shot.

In-depth, focused content outperforms content about 10 different topics

Like I said, you can’t publish 1,890 words of fluff and expect to light the world on fire.

And this study found the same thing. They discovered that content rated by software as “topically relevant” ranked above content with a low content score:

Image Credit: Backlinko

So what does this mean, exactly?

It means that when you write about something, cover one topic in-depth.

For example, here’s a post about building an email list from the Buffer blog.

In this post they write about one thing and one thing only: how to grow your email list. They don’t meander off and talk about social media. Or content. Or blogging. Or building relationships.

It’s 110 percent about getting more emails. That’s it.

That focus is one of the reasons that the post ranks #4 in Google for the keyword “list building”.

That’s what you want to do with every post that you write. In my experience this approach produces flat out better content in general. And it may also boost your rankings.

That’s what you want to do with every post that you write. In my experience this approach produces flat out better content in general. And it may also boost your rankings.

Related: Will the New Domain Extensions Negatively Impact Your SEO?

Site speed makes a difference

You’ve probably heard that Google prefers fast-loading websites. In fact, Google has emphasized that they use site speed as part of their algorithm.

According to this study, this appears to be the case:

Image Credit: Backlinko

How can you make your site load faster?

At Criminally Prolific I use a (free) plugin called WP Super Cache. I’ve notice that it makes a huge difference in my loading speed. And it takes about 5.3 seconds to set up. Other programs people use include WP Rocket, WP Smush, and Max CDN.

That’s it!

Continue to put out amazing content and follow my advice and you’ll be on the fast track to the tippity top of Google’s first page.

 

Call Now Button