Chapter 3

Using Redirects for SEO

In This Chapter

  • Understanding when to use a redirect command
  • Discriminating between the different types of redirects
  • Understanding 301 and 302 Redirects
  • Knowing when to use Meta refreshes
  • Considering JavaScript redirects
  • Dovetailing your www and non-www domains properly

In your toolbox of search engine optimization (SEO) techniques, the redirect tool is an important one to master. Redirects are HTML or server commands that automatically forward incoming links to another page. With this tool, you can trim outdated pages off your site without losing the visitors who still go to those pages. You can also organize many domains (root names of website URLs) into one site, so that they won’t be competing with each other. With redirects, you can avoid creating duplicate content (web pages that search engines see as duplicates of each other) that could damage your rankings on search engine results pages (SERPs). And the best part is that redirects are not at all hard to learn.

This chapter covers the four main types of redirects. We explain what each type is for, although for SEO purposes, only one type of redirect is safe to use — a 301 Redirect. In Chapter 4 of this minibook, you can discover the how-to’s of placing 301 Redirects in your website.

Discovering the Types of Redirects

There are several different types of redirects in the world of the Internet. These commands give you a way to redirect your site visitors from one URL (the web address of a page, such as www.wiley.com) to another (like www.wiley.com/index.htm). Often, you need to use a redirect to reroute people linking to an old page to its replacement page, especially if your website undergoes reorganization so that files and directories have to be renamed and moved around. You also need to use redirects in the normal course of site maintenance, to help visitors coming to alternative URLs (such as the non-www version of your domain instead of the www version, and so on) to get to the URLs that contain the content they’re looking for.

technicalstuff Short for redirection status codes, the various redirects are defined by the World Wide Web Consortium (W3C), an organization that oversees Internet practices and creates standards that enable websites all over the world to work smoothly together as one giant network. Webmasters have a bunch of tricks that they can use, but not all of them benefit you, your site, your users, or your search engine rankings. In the case of redirects, although the available redirect methods are intended to have different functions, only one is thoroughly search engine friendly.

In the following sections, you can find out about the four most common ways to handle automatically redirecting one URL to a different URL: 301 Redirects, 302 Redirects, Meta refreshes, and JavaScript redirects.

301 (permanent) Redirects

The 301 Redirect is the preferred and most SEO-friendly form of redirect. Also known as a permanent redirect, the 301 Redirect informs a search engine that the page has been permanently moved to a new location. This is the cleanest redirect because there’s no ambiguity — the search engines get a clear message that one page is history and some other URL has now taken its place.

To put it in perspective, say that your favorite barbeque restaurant closes without your knowledge. Fortunately for you, the next time you head over for its mouth-watering ribs, you see a sign in the window: We’ve Moved to a New Location: 123 Yummy Drive. This sign enables you to get back in the car and head to the restaurant’s new location without too much inconvenience.

A 301 Redirect is kind of like a We’ve Moved sign, but better. On the web, visitors don’t even have to realize you’ve moved. Your website automatically redirects them to the new URL and displays the new page.

If you’ve registered a vanity URL (an easy-to-remember domain that isn’t your main business domain name), you should put a 301 Redirect on the vanity URL so that when users go to it, they end up at your real site, instead. For example, people interested in a currently playing movie often type the movie title directly into their browser’s address bar, so movie studios try to register those URLs in advance. For the 2008 movie The Dark Knight, if you type in www.thedarkknight.com, you’re automatically redirected to http://thedarkknight.warnerbros.com/dvdsite/, which is a subdomain on the Warner Brothers studio site. That’s because the studio wisely secured the movie title URL and then redirected it to the actual site by using a 301 Redirect, thereby capturing more website traffic.

tip For site maintenance, you could use 301 Redirects when physically reorganizing your pages and directories. For instance, you might redirect a page with a ghastly long URL (such as www.classiccarcustomization.com/extras/dashboard/gauges-chevrolet-impala/speed-or-tach/139348w9d.htm) to a new and cleaner URL address (like www.classiccarcustomization.com/chevrolet/gauges/impala-tachometer.htm). You wouldn’t want to keep the old page location active on your website, but there are backlinks (incoming links from other websites) to the old page that you don’t want to break. So you can’t bring in the wreaking ball and just demolish the page — you need to redirect the old URL to the new one instead. The right way to do this is to set up a 301 Redirect from the old URL to the new one. Then, users who click to come to the old page automatically find themselves looking at the new one; also, search engines get the message loud and clear.

When a search engine encounters a 301 Redirect, it does three things:

  • Drops the now defunct page from its index (database of web pages from which the search engine pulls search results) so that that page won’t be included in future search results.
  • Includes the new page in the index, available for listing on search results pages.
  • Transfers link equity from the old page to the new. (Link equity refers to the value of all incoming links to a page, which the search engines use to help determine a web page’s authority, or expertise, in its subject matter.)

remember The 301 Redirect is the SEO-recommended form of redirect because it reduces duplicate content within the search engine index. Duplicate content hurts your search engine rankings because search engines don’t want to show their users results that are essentially the same. Therefore, if a search engine detects that two pages it has indexed are the same, it filters out the less authoritative page so that only one of the pages can appear in search engine results pages (SERPs). Because a search engine responds to a 301 Redirect by dropping the old page entirely from its index, the chance of having two pages in the index with the same content is nil. (See Chapter 4 of this minibook for details on implementing 301 Redirects.)

302 (temporary) Redirects

Another commonly used form of redirect is the 302 Redirect, which signifies Document Found Elsewhere. You use this redirect for temporary relocations of a web page. Search engines see the new page as only temporary and continue to crawl and index the original location, instead.

Although the search engines claim to be able to interpret a 302 Redirect correctly, 302 Redirects can cause search engines to index duplicate content. Because duplicate content can cause search engines to filter pages from SERPs or assign pages to a supplemental index, for the sake of your SEO efforts, avoid using 302 Redirects. (Note: We cover duplicate content in depth in Book V, Chapter 5.)

Remember, 301 and 302 Redirects are server (not HTML) commands, whereas you use the types of redirects in the following sections within an HTML page.

Meta refreshes

A Meta refresh is a type of Meta tag (a command located in the Head section, or top section, of a web page’s HTML code) that tells the page to refresh automatically after a given time interval. When you refresh a page (by clicking the browser’s Refresh button, for example), it causes the page to reload and redisplay its contents. A Meta refresh command can be written in several ways:

  • Refresh the page instantly (time delay = 0).
  • Refresh the page after an interval (time delay = 1 or more seconds).
  • Refresh the page repeatedly every X number of seconds.
  • Refresh to another page (with or without a time delay).

Officially, search engines say that they handle Meta refreshes as follows:

  • A Meta refresh that has a time delay of zero (0) or one second (1) is treated like a 301 Redirect.
  • A Meta refresh that has a time delay of two (2) or more seconds is treated like a 302 Redirect.

However, we’ve observed that this isn’t usually the case. The search engines sometimes follow the link (as they would with a 301 or 302), but sometimes they don’t. Sometimes they index the new content, but sometimes they ignore it. The search engines don’t handle Meta refreshes reliably, and that’s one reason to avoid using them in your website.

Another reason to steer clear of Meta refreshes is that they look suspicious to the search engines. Because Meta refreshes can be used to show different content to a search engine than to a user, they have traditionally been used by spam sites (websites that intentionally deceive search engines about their real content). In one case, a site put up pages about baby blankets, but it was just a cover for a pornography site. The search engines didn’t see the porn content because the Meta refreshes delayed the change. A grandmother searching for baby blankets discovered the truth and reported the site. The search engine’s spam team went to work, and soon that site was banned from the index. (For more about spam, see Book I, Chapter 6.)

Many sites use Meta refreshes for legitimate reasons, as well. For example, the Los Angeles Times (www.latimes.com) uses a Meta refresh to refresh its front page every 600 seconds (ten minutes). It refreshes its front page to make sure that online readers always see the most up-to-date news because its stories change frequently. However, search engine spiders don’t stay on the page for ten minutes to read the new content. The spider sees only what’s on the page at the outset.

warning With a typical site (less well known than the L.A. Times), you don’t want the search engines to miss reading all your rich content, so you can have the maximum chance of ranking in search results. Even worse, using a Meta refresh may get your site flagged as suspected spam. Search engines especially suspect sites that use a Meta refresh to fetch another page. Bottom line: If you need to redirect users and search engines to a new URL for a page, do it with a 301 Redirect.

JavaScript redirects

The search engines have a hard time following and indexing your pages properly if you program a redirect by using JavaScript (a scripting language that can add functionality to websites). JavaScript redirects give you the ability to customize the user experience, so the benefit is all on the usability end of the spectrum. (Usability refers to the user-friendliness of the site, which in this case runs counter to search engine–friendliness.) A JavaScript redirect is also not recommended from an SEO perspective. The problem is that search engines cannot execute JavaScript and therefore cannot follow the redirect to a new page.

With JavaScript, you can redirect users to particular versions of a page based on settings that can be detected by JavaScript. You can detect the user’s browser type, Flash capability, cookies settings, and so forth. So you could deliver a page that has Flash animations to users who have the Flash plug-in installed, but show a non-Flash-enhanced page to others — in other words, personalize it somewhat. That’s a useful application, but sites can also use JavaScript deceptively to create a “bait-and-switch” type of effect.

The search engines usually flag instances of JavaScript redirects for human review. Flagged sites are then dependent on the discretion of the human reviewer, who determines if the redirect benefits the user — in which case it's usually allowed — or if it is a tactic for delivering a different page to a spider than it delivers to a user — in which case the site could be penalized for spam (that is, thrown out of the index or buried way down in the results page). And because the search engines continuously improve their spam-detection efforts, you want to make sure to keep your website practices in the safe harbor.

We recommend that you never implement JavaScript redirects, except for personalization. Even if you’re not doing something wrong, you don’t want to attract negative attention from the search engines. It’s similar to driving when there’s a police car present. You watch your speedometer to make sure you don’t go over the speed limit even a little because that could catch the officer’s attention. And if the police officer notices you, she might also notice that you’re not wearing a seatbelt or that your right taillight is out. You’re better off just not attracting attention in the first place.

Reconciling Your www and Non-www URLs

How can you use redirects on a practical level? One common situation solved by a 301 Redirect involves how to reconcile your www and non-www domains.

If you’re like most website owners today, you probably have two versions of your site URL, one with and one without the www. in front of the domain name, such as

www.yourdomain.com
yourdomain.com

Having both versions is recommended because users have a tendency to type either of the versions into their browser, and you want to receive all that traffic. However, because these are treated as two different websites, you have to make it clear to them which address is the main, or canonical, site. Otherwise, you may end up competing against yourself for search engine rankings.

Unfortunately, many websites don’t handle the dual-version URL issue correctly. They end up with pages from both the www and the non-www URL versions indexed by the search engines. This is a problem because if both the www and the non-www versions of a URL are indexed, your pages look like duplicates in the index — this causes the search engines to filter some of your pages out of their search results. Similarly, if there are links pointing to both versions (either internal links on your own site or external links originating on other websites), your link equity is diluted because it's split between the two URLs. (Link equity refers to the value of all your incoming links, which search engines use to determine your page’s authority and expertise on its subject matter.)

We always recommend that sites use a 301 Redirect on the non-www version of any URL to the www version. Doing so prevents the search engines from indexing duplicate content and protects your link equity from being diluted.

remember It doesn’t matter which way you go — you could point the www version to the non-www version just as effectively as you could point the non-www version to the URL starting with www. However, it’s more usual to make your www version the main site.

To ensure that www.yourdomain.com is indexed as your canonical site, you need to do one of two things. The best way to make sure that the search engines index your site in the way you want is to set up a 301 Redirect (a permanent redirect, not any other kind) that points the entire yourdomain.com site to www.yourdomain.com. Using a 301 Redirect ensures that any kind of spider or browser that comes to your site gets the version of the domain that you want it to see, with no mistakes. (Remember, you can find all the nitty-gritty details on doing this in Chapter 4 of this minibook.)

However, if you can’t set up 301 Redirects and don't want to dump your web host, you have another option. You can submit www.yourdomain.com to Google as your preferred domain. (This works for Google only, so you might still have issues with Bing and thus Yahoo by proxy.) Google allows you to submit your preferred domain to it in its webmaster tools. This allows you to decide which versions of your URLs you want Google to index, which can help prevent any potential problems from the non-www issue. Please see www.google.com/support/webmasters/bin/answer.py?answer=44231 for more information about this particular feature.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.244.250