Home | Search Engine Optimization | Technical SEO

Archives For Technical SEO

I don’t often write about technical SEO issues anymore on this site, but I have over time often come across questions about when it is best to use a 301 vs a 302 vs a canonical tag on duplicate content. I thought I’d take the opportunity to talk about each in depth with the pros and cons of each, as well as a few examples of when to use them.

Canonical Tags

Canonical tags, as you should well know if you are an SEO professional, are a meta tag placed in the <head> of your page that points to the original source of the information contained on the page. It looks like this:

<link rel=”canonicalhref=”http://www.trulia.com/rental-community/9000058375/AVA-55-Ninth-55-9th-St-San-Francisco-CA-94103/” />

The canonical tag was introduced back in 2009 and this post over on Moz covered it in-depth, even calling it “the most important advancement in SEO practices since the sitemap.” Of course, that was 5 years ago but even in the latest Mozscape update only 18.02% of URLs have a canonical tag (even a self-referencing one) implemented.

Pros of using a canonical tag

A canonical tag is useful to tell Google when content on your site or another site may be duplicated. As SEO professionals know, duplicate content can kill your organic traffic, especially in the long tail of traffic.A canonical tag on a small scale can work on duplicate content on your site. It is also useful, and meant, to be used on other sites who syndicate your content to tell Google where the original piece of content that should be ranked exists. A canonical tag will not always work to get URLs to drop out of the index or optimize your crawling sufficiently. However, it can be really useful if you have multiple views for your users or pagination broken up for advertising/pageview purposes but you still want the search engines to index the full, one-page, longform version of the article for ranking.

Cons of using a canonical tag

A canonical tag, when used wrongly, can be a band-aid on a wound that requires stitches or even surgery. While a self-referencing canonical can save your traffic if your site is scraped, on a massive scale of millions of URLs duplicated within your own domain the crawl bandwidth becomes unwieldy and takes important crawls away from your money pages. And, when the URL 404s eventually, the link equity will not be passed to the canonical URL. You literally leak very important link equity across your site’s 404s.

Final Words on Canonical Tags

Canonical tags can help you when your content is scraped or syndicated because it tells the search crawlers (the ones that respect canonicals, at least) the original source of the content. On a large scale within your own domain, though, you’re usually better off doing a bit of refactoring (aka surgery) on your site to solve your duplicate content issues instead of using the canonical band-aid. The search engines have said that if you use too many canonicals and send too many confusing signals, they might choose to ignore your canonical directives. Rand Fishkin has this well-known graphic about canonicals: canonical-url-tag

301 Redirects

A 301 redirect tells the search engines that a piece of content has moved permanently and that means:

  • Users will now be directed to this new page, and
  • Any links to the first URL should now count towards the ranking power of the new destination URL.

Pros of Using A 301 Redirect

There are many good reasons to use a 301 redirect. For pure SEO purposes, a 301 redirect will preserve link equity and thus the new destination URL has a good chance of ranking. Second, a 301 redirect will make an old URL drop out of a search engine’s index relatively quickly and you will be working towards optimizing your crawl. A 301 redirect is great for:

  • Dealing with www/non-www and trailing/non-trailing slash issues.
  • Dealing with duplicate content issues like domain.com/index.php and others caused by different CMSs that are commonly used.
  • Domain and URL migrations, such as new URL structures (by mapping 1:1 redirects between old and new), moving to HTTPS, or a multitude of other reasons to change your URLs.

Cons of Using A 301 Redirect

Because a 301 redirect is a “permanent” redirect, undoing it means that the search engines will take a little bit of time to a) discover and b) index the page again.

302 Redirects

A 302 redirect is different from a 301 redirect in that it sends a “temporarily gone” signal to the search engines, which in effect tells them “This URL has moved for now, but keep it around and keep crawling it because it will likely be coming back pretty soon.” A 302 redirect works great when you have a page that is ranking well, but you have a new version of the page for a short amount of time where you want the users to go until that new page goes away (we do this on Trulia).

Pros of Using A 302 Redirect

A 302 redirect can be great because it a) keeps the same URL ranking and still b) passes the user to a new URL that might be around for a short amount of time. A 302 redirect is often used when a product goes off the market and you want to send them to a category page until that product comes back. That bolded part is important, because if the URL will never come back (eg it is assigned a new id when it comes back onto the site), then you should use a 301 instead of a 302.

Cons of Using A 302 Redirect

Conventional SEO wisdom says that a 302 redirect does not pass link equity (though a recent study appears to disprove this). However, it’s still best practice to use a 301 redirect when a page is permanently gone and a 302 redirect when the page will likely be coming back. A 302 redirect will also keep the old URL in the index and the search engines will keep crawling it, so be sure that you really want the original page to keep ranking for the terms it is currently ranking for. Here is a graphic to illustrate a 301 or 302: 301-and-302-Redirect

So, Should I Use a Canonical, 301, or 302 Redirect?

Canonicals, 301s, and 302s are all valid to use at different times and all have their pros and cons. Here are some rules of thumb for you. Use a canonical if you:

  1. Have multiple views for users, but want to avoid duplicate content;
  2. Need to eliminate parameters on content that could cause duplicate content issues (such as with non-UTM tracking parameters)

Use a 301 redirect if:

  1. Your content is actually moved and the old URL will never come back;
  2. You are moving URLs for whatever reason and want your new URLs to rank;
  3. You are done with a campaign and you want those links to count towards another page now.

Use a 302 redirect if:

  1. Content is truly only moved temporarily and you want the original URL to keep ranking, but for users to go to the new URL;
  2. You have a page like a product or category that will come back once inventory exists again. Only use a 302 if the same item id will be applied to the new product or SKU.

Hopefully this post has helped you determine if you should use a canonical, 301, or 302 redirect! If you still need help, reach out (john@hiregun.co). We can hop on a Clarity.fm call or I can find you a consultant through HireGun.

Back in April at Linklove, I presented on Tools of the SEO Trade. In that talk, I talked about somewhere in the neighborhood of 60 different tools available for use. I built out a couple for people to use as well (for free), and today I want to talk about one of them.

Introducing the Quora RSS Scraper Importer

One of the tools I built out, which is actually a tool that I built back in January or February for a client, is a Google Spreadsheet that imports the most recent Quora posts based on a Quora category. I’ll explain this further down, but if you’re impatient you can:

Download and Copy the Spreadsheet

Continue Reading…

On simple blogs or websites, navigation is usually quite straight-forward. You organize your site into categories, or funnels, of information or articles. You link to your most important pages and try to minimize duplicate content.

When you have a large ecommerce, travel, or other large site, however, sometimes this is not enough. If you have millions of pages, and want as many as possible to be indexed and ranking well, you simply cannot, nor would you want to, link to every page. Imagine this scenario where the only difference is color -

  • http://www.example.com/shirts/ralph-lauren-red-polos
  • http://www.example.com/shirts/ralph-lauren-blue-polos
  • http://www.example.com/shirts/ralph-lauren-yellow-polos
  • http://www.example.com/shirts/ralph-lauren-pink-polos

Let’s be honest. It’s going to be impossible to make all of these pages unique and ranking-worthy.

Or to use a skiing example, where the only difference is length – Continue Reading…

A month or so ago Google announced they are now supporting the HREFLANG markup for translated content that they used to mark as duplicate. I had just completed an international audit for one of my enterprise clients, so I was interested to do some testing on this to see what effect it might have.

The results are very interesting!

Continue Reading…

There seems to be a lot of confusion in the world of SEO today, especially in clients minds and with their technical teams, about when to use a 301 redirect and when to use the rel=canonical tag. My goal with today’s post is to explain the differences and talk through some of the nuances to help you think through which one pertains to your situation. Every situation is different, so take the time to read and figure out which is better for you.

Continue Reading…

A few weeks ago, I was reading through some posts on the official Google blogs, such as InsideSearch, WebmasterCentral, and the GoogleBlog. I was taking notes and sharing a few links via the Tweeters, and while doing such I noticed a link like this:

Search queries data is....what?

Continue Reading…

I recently made a mistake with my Google Analytics, so in the interest of transparency and a teachable attitude, I want to show you exactly what I did, what happened, and why you should not do it. Then, we’ll set one up correctly.

This ought to be fun. Let’s roll.

Continue Reading…

Arguably one of the worst mistakes that can be made with a website is hiding content (inadvertently, not in a cloaking way) from search engines. Since on-page SEO and quality content have become larger ranking factors in the past 2 years (and especially since Panda first rolled out in February), we have to make sure that content is quality and visible.

For optimal SEO benefit, do not develop a site in Flash. And, do not hide content behind Javascript or other code.

Continue Reading…

Sometimes when SEOs run tests, we find hacks and workarounds for ways to get things done. I’ve recently been running some tests about rel=author, to try to get it to show for my site and others.

I now have conclusive proof that rel=author is not algorithmic. Rather, it is manual by site AND author. And I bet that the authority of the site has something to do with whether or not it shows as well. So we have a combination of who the author is as well as the specific site. If your photo shows for one site, it will not necessarily show for another.

Allow me to demonstrate.

Continue Reading…

Linkbuilding gets all of the love in the SEO community, but we often forget that technical SEO is the solid foundation upon which linkbuilding and SEO are built. If you don’t have your information architecture, redirects, and solid code in place, a lot of your efforts will be wasted.

Today I want to talk about the .htaccess file. There are many ways to implement 301 redirects (remember that 302 temporary redirects are bad news), but if you are using an Apache server, the best way to implement a redirect server-side is via the .htaccess file.

Note: if you’re not hosting on your own server, you must check with your hosting provider. Some hosting providers, such as Bluehost, will help you out with redirects, or at least redirecting a domain you bought for ORM reasons.

Continue Reading…