In 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: 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]
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.
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.

Atlanta Real Estate
October 10, 2009 at 11:53 am
Jack:
Good post. You’re a brave man though!
RM
NorthMetroSBDC
October 10, 2009 at 4:37 pm
RT @SEOnewz: SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://cli.gs/dteBv
SEO Bird
October 10, 2009 at 5:17 pm
SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://bit.ly/3aHRaB
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…
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.
Shirley
October 10, 2009 at 6:15 pm
SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://bit.ly/PbmhL
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.
Houseologist
October 10, 2009 at 9:11 pm
SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://bit.ly/5Sejf
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
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
Zeeways
October 10, 2009 at 9:36 pm
SEO Tip – Canonicalization | Real Estate Opinion MAG – AgentGenius https://bit.ly/YullA
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
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
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?
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.
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.
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)
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.
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.
Alexis Jameson
October 22, 2009 at 1:03 am
Keep up the good work with your post – very informative!