Connect with us

Hi, what are you looking for?

The American GeniusThe American Genius

SEO Tip – Canonicalization

World Wide WebIn last week’s SEO Tip about linking to the home page correctly, I promised to tell you how to do “canonicalization” (just don’t ask me to pronounce it).  As a quick refresher, canonicalization is a fancy word that means to direct traffic from multiple, possibly undesirable addresses, to a single preferred address.

The most common use for this is for telling your web server to only display pages either with the “www.” or without it, but not both.  This is typically done by editing a special file named “.htaccess” located in your web servers “root” or top most folder.  If you are not VERY comfortable making changes to your server configuration, or your site is hosted on a windows server (most are not), you may need to contact your hosting company to get this set up for you.

CAUTION: techie geek stuff aheadCAUTION: Extreme geekiness ahead!  If you  are comfortable attempting this, you should know that the .htaccess file can be used for all sorts of things, besides redirects.  It can contain security settings, server configurations and file type settings to name just a few.  If you are not careful you could cause serious problems – including preventing access to your site.  Be carefull if you decide to edit this yourself.  Create a copy first, just in case.

If you want your site to only be viewed without the “www.“ then you should add this code to the bottom of your .htaccess file:

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

If you want to force your site to use the “www.”, then you should add this code to the bottom of your .htaccess file:

RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ https://www.domain.com/$1 [r=301,nc]

Advertisement. Scroll to continue reading.

I feel it’s important to caution you again – while the code used to do redirects is rather simple, even a small error can have significant consequences for your site.  Use EXTREME caution.

As far as SEO is concerned, neither way is better than the other, just be consistent.  However, shorter domains are generally easier to use on various social sites.

Canonicalization is also useful at the individual file or post level.  If you use WordPress, or practically any Content Management System (CMS) to run your site there is a very good chance you are creating multiple paths you’re your content, also called “duplicate content”, without even realizing it.  Can visitors get to your pages through archives, categories or tags?  If yes, you are probably have duplicate content.  This should be an easy fix though.  Google and the other engines adopted the use of a special META tag (Sorry – more of them) called the canonical tag.  It’s a way for you to tell the engines which path it should consider the “correct” path.  In WordPress there are plugins like the All in One SEO Pack that will create this for your automagically.  If you are creating code by hand then you just need to add the following to the HEAD section of your pages:

<link rel="canonical" href="https://www.yourdoman.com/path-to-your-post/" />

I know this post ranked high on the geek-o-meter, but hopefully no one’s head exploded.  Duplicate content is a serious issue, but thankfully it’s one that is easily avoided on your own sites and now you know how to do it, or at least now you know you have to tell your host to fix it.

It’s been a few weeks since we started this series – hopefully you are finding them helpful and are seeing some positive effects in your rankings.

Advertisement. Scroll to continue reading.
Written By

Jack Leblond is a SEO/SEM professional working for a large corporation full time in Austin, TX. He is not a Realtor, he is our in-house SEO expert. Jack is the Director of Internet Strategy and Operations for TG (www.tgslc.org). In addition to managing the team that develops and maintains the company's multiple Web sites, he focuses on Search Engine Optimization (SEO), e-marketing and Social Media. Jack's background ranges from Submarine Sonar Technician/Instructor for the United States Navy, technical writer, pioneer in internet/intranet creation for McGraw-Hill and Times Mirror Higher Education, former Adjunct Professor for two Universities teaching web-related courses, has served as a city council member and co-founded Net-Smart, a web design and hosting company, where he managed networks and oversaw the development of hundreds of Web sites. As a free-lance SEO consultant, Jack performs SEO Site Audits for small/medium businesses that want their web sites to perform better in the search engine listings.

20 Comments

20 Comments

  1. Atlanta Real Estate

    October 10, 2009 at 11:53 am

    Jack:

    Good post. You’re a brave man though!

    RM

  2. NorthMetroSBDC

    October 10, 2009 at 4:37 pm

    RT @SEOnewz: SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://cli.gs/dteBv

  3. SEO Bird

    October 10, 2009 at 5:17 pm

    SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://bit.ly/3aHRaB

  4. Tek Loong Lee

    October 10, 2009 at 5:43 pm

    Real Estate news | SEO Tip – Canonicalization | Real Estate Opinion MAG – Agen.. https://bit.ly/3aHRaB
    | Read More…

  5. Doug Francis

    October 10, 2009 at 6:00 pm

    Wow, I just asked this question at RE BarCamp in Lynchburg on Thursday… and I’m 99.9% sure you weren’t there!

    There was one guy who discussed “conicalization” with me since I was asking about links that I see at Google Webmaster Tools vs. link:dougfrancis.com. Seems that Google WT showns 1500+ links but link: shows few.

    His answer, it’s a conicalization issue, no?

    Jack, my suggestion to your readers is to BACK-UP your site before messing around with any code, especially any file referred to as a “special file” by you.

  6. Shirley

    October 10, 2009 at 6:15 pm

    SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://bit.ly/PbmhL

  7. Bob

    October 10, 2009 at 6:51 pm

    Google shows links to both the www and non-www if you are either

    a) not rediretcing one to the other,

    or

    b) using a 302 redirect

    In your case Doug, you are employing a 302 redirect, which tells Google this is just a temporary redirect. It is also wasting the PR from one set of those links as a 302 doesnt pass page rank.

  8. Houseologist

    October 10, 2009 at 9:11 pm

    SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://bit.ly/5Sejf

  9. Ara Mamourian

    October 10, 2009 at 9:14 pm

    SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius: In last week's SEO Tip about linking to.. https://bit.ly/2unxIM

  10. Daniel Arlt

    October 10, 2009 at 9:16 pm

    SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius: In addition to managing the team that devel.. https://bit.ly/1vQ9iB

  11. Zeeways

    October 10, 2009 at 9:36 pm

    SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://bit.ly/YullA

  12. Naomi

    October 10, 2009 at 9:49 pm

    SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius: … a web design and hosting company, where.. https://bit.ly/3aHRaB

  13. Wm Cole Smith

    October 11, 2009 at 8:32 am

    SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius: More Agent Tools. agent IDX solutions AG Ap.. https://tinyurl.com/yzpkymp

  14. Doug Francis

    October 11, 2009 at 12:07 pm

    Bob – thanks for the heads up since it made me think about my GoDaddy account (where I host my site).

    I have had dougfrancis.com since 1999 but when I started the current site it was under another domain name hosted elsewhere which was a super slow host.

    We switched everything to GoDaddy in May or June for speed and simplicity but I had redirected the domains back to the old site/host. Ooops, I had forgotten to tell GoDaddy that dougfrancis.com is hosted (now) with them. When I checked this morning the GD Nameservers still thought it was hosted with another provider. So I selected “hosting account” at GD.

    I really appreciate your suggestions… and will keep you posted.

    Hey, I thought “geekiness” is cool?

  15. Bob Wilson

    October 11, 2009 at 3:35 pm

    One cool thing with Jack’s series here is that it goes to show that it all starts with the basics.

    You will want to redirect dougfrancishomes.com as well using a 301. There are several links pointing to that domain that are being wasted becuase of the 302.

  16. Doug Francis

    October 11, 2009 at 3:41 pm

    I’ve been in there getting that done… thanks. All my domains were forwarding to the other host, now they are forwarding to dougfrancis.com on the godaddy nameserver.

  17. Claudia Gonella

    October 12, 2009 at 9:37 pm

    The other common duplicate url is for the home page where a index.php or index.htm file is used. (ie home page found on both domain.com and domain.com/index.htm)

  18. Jake Brumble

    October 13, 2009 at 3:42 am

    Ah yes, another spider instruction, I see the point.

    I don’t care for the www prefix. it seems a bit archaic, these days it seems most useful for your site address on a business cards, sans http // www mysite.net better cues the reader than mysite.net.

    I will stick with the prefixless mysite.com form even though, as I understand cookies for the domain will also apply to any subdomains.

  19. Jack Leblond

    October 13, 2009 at 1:35 pm

    Looks like you guys all answered all your own questions while I was vacationing in the great state of Maine. Nice work.

    Hopefully this didn’t knock you all to far off the geek-scale.

  20. Alexis Jameson

    October 22, 2009 at 1:03 am

    Keep up the good work with your post – very informative!

Leave a Reply

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

Advertisement

The
American Genius
news neatly in your inbox

Subscribe to our mailing list for news sent straight to your email inbox.

Advertisement

KEEP READING!

Business Marketing

Google adds a redesign quietly to its search engine, adding filters that will change what we know about SEO Marketing.

Tech News

Semrush is a star in the sea of SEO companies, and they just released an insider look at the latest and greatest SEO trends.

Business Marketing

(MARKETING) SEO is more complex today than it ever has been, and whether doing it yourself or hiring a pro, you need to know...

Business Marketing

(MARKETING) Despite sexier emerging trends, the reality is that you can’t build out a successful online presence and marketing strategy without SEO.

Advertisement

The American Genius is a strong news voice in the entrepreneur and tech world, offering meaningful, concise insight into emerging technologies, the digital economy, best practices, and a shifting business culture. We refuse to publish fluff, and our readers rely on us for inspiring action. Copyright © 2005-2022, The American Genius, LLC.