The Joomla! Forum ™





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 36 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: SEO: Canonicalization
PostPosted: Tue Mar 25, 2008 4:58 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Jul 18, 2006 3:55 pm
Posts: 1028
1. INTRODUCTION

Making sure that Google doesn't treat http://www.mydomain.com or mydomain.com as different domains

2. SCOPE

Canonicalization is big word I can rarely spell but the idea is pretty simple. If the site is based on http://www.mydomain.com or mydomain.com, all the pages will show the same way. Currently we need to add extra lines of code in .htaccess to do this. Wordpress does it automatically.

_________________
The best-selling Joomla book: http://JoomlaExplained.com
Online and classroom Joomla training: http://OSTraining.com


Top
 Profile  
 
PostPosted: Tue Mar 25, 2008 8:50 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
No. I do not agree that we would automatically decide people can't have www in their domain name.

Obviously, I think it's a good idea, which is why I added it as a GHOP task and worked with the student to provide documentation on how to do so.

But, not everyone wants this - further, it must be defined in Google Webmaster services, anyway, so it couldn't be taken care of in core.

Wonder about the Wordpress claim. Must be an add-on. Certainly, core WordPress doesn't do this.

Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Tue Mar 25, 2008 8:53 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Fri Sep 02, 2005 10:06 am
Posts: 3177
Location: Solar system - Earth - European Union
AmyStephen wrote:
But, not everyone wants this - further, it must be defined in Google Webmaster services, anyway, so it couldn't be taken care of in core.


exactly my idea, sorry I agree with Amy. I don't see a very need for that!

_________________
former Q&T WorkGroup Joomla member - Italian Translation Team Member


Top
 Profile  
 
PostPosted: Tue Mar 25, 2008 8:55 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Who in the world would be sorry that they agree with Amy? :D

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Tue Mar 25, 2008 9:00 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Jul 18, 2006 3:55 pm
Posts: 1028
Misunderstanding here ... Wordpress helps you if you want www OR non-www

They simply help you maintain your choice across the whole site.

_________________
The best-selling Joomla book: http://JoomlaExplained.com
Online and classroom Joomla training: http://OSTraining.com


Top
 Profile  
 
PostPosted: Wed Mar 26, 2008 3:09 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
If it could be handled in the router and there was a new Global configuration option that could be activated only if you used an .htaccess file, then I agree, this would be a nice feature to have. It can make a significant difference on your Google Page Rank. (I wonder, though, if Google will ever fix this.)

Thanks for helping me understand this better.

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Fri Apr 11, 2008 3:59 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
Can you give a more formal example of how things should be changed, for example, with http://www.joomla.org with examples of what is happening now and what should happen.

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Fri Apr 11, 2008 12:14 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Jul 18, 2006 3:55 pm
Posts: 1028
From Matt Cutts at Google:
http://www.mattcutts.com/blog/canonicalization-update/

Quote:
Some people ask “Why don’t you just assume http://www.example.com and example.com are the same?” The answer is that they don’t have to be, and for some websites they are different. For example, http://phpicalendar.net/ is a different page than http://www.phpicalendar.net/. This happens more often than you might think; FindWhat has different www vs. non-www pages, for example.


So http://www.joomla.org and joomla.org can be indexed and ranked as if they were separate sites. Not definitely going to happen, but its possible. Currently I see the same content if I visit http://www.joomla.org and http://joomla.org.

In 1.0 $mosConfig_live_site would be the logical choice to set the choice of www or non-www. In Joomla 1.5 I'm not so sure.

Wordpress info:
http://wordpress.org/support/topic/156533
http://perishablepress.com/press/2008/0 ... wordpress/

_________________
The best-selling Joomla book: http://JoomlaExplained.com
Online and classroom Joomla training: http://OSTraining.com


Top
 Profile  
 
PostPosted: Fri Apr 11, 2008 2:13 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
1.5.1 has a live_site variable in it if you need to use it, though upgrade to 1.5.2 if possible.

I will check out what Wordpress has got going soon to see how they handle things.

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Fri Apr 25, 2008 12:00 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
Still haven't gotten around to checking out wordpress, but give what I've attached a go. Basically you install it, feed it the correct hostname and when the hostname doesn't match (as per $_SERVER['HTTP_HOST']) then it resets the location, sends a 301 (Moved Permanently) and kills the app. Let me know if this is similar to what you're chasing and resolves the issue for you.

edit: updated XML installer and swapped a variable
edit 2: updated to fix SSL detection code


You do not have the required permissions to view the files attached to this post.

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Fri Apr 25, 2008 3:17 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Jul 18, 2006 3:55 pm
Posts: 1028
Thanks Sam

Tested this on 1.5.3 but couldn't get any traction.

Could you post some quick instructions for setup?

_________________
The best-selling Joomla book: http://JoomlaExplained.com
Online and classroom Joomla training: http://OSTraining.com


Top
 Profile  
 
PostPosted: Sat Apr 26, 2008 1:36 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
All you need to do is feed the correct value of HTTP_HOST into the plugin's params and it'll update any URL with a 301 to point to the correct HTTP_HOST. And publish it as well. To test just go to your site at one of its alternate addresses, so in my case I used sammoffatt.com.au and hit it on http://www.sammoffatt.com.au instead.

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Sat Apr 26, 2008 3:01 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
I've updated the original to fix an issue with SSL detection now that I've tested some stuff on an SSL enabled server. I've replaced the original attachment with the new one (only a slight change).

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Sun Jul 06, 2008 6:09 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 25, 2008 1:25 pm
Posts: 5
In my case the plugin didnt work well, it went into an endless redirecting loop.

My site is on a free host, the free name for the site is http://XXX.extra.hu. Now I got a real domain name for the site, which is http://XXX.hu, plus I got the www version with it too, which is http://www.XXX.hu.

I wanted to use the http://www.XXX.hu name variant everywhere. The problem with your plugin is that the HTTP_HOST in my case points to either XXX.extra.hu or XXX.hu depending on the call, but never contains the http://www.XXX.hu - which I wanted to use! So if I set the preferred hostname to http://www.XXX.hu in admin with your plugin, I got into an endless loop, because the plugin will NEVER see the www variant, so always tries to redirect :(

Your code in my setup successfully hides the original free name XXX.extra.hu, but can't tell http://www.XXX.hu and XXX.hu apart.

I replaced HTTP_HOST with SERVER_NAME which returns not the hostname, but the virtual host name. It seems to work in my (somewhat weird) setup!

Thanks for your plugin, I was looking for this one for some time!
(btw XXX = 'enekelazorszag', its a long hungarian name of a project)


Top
 Profile  
 
PostPosted: Sun Jul 06, 2008 6:44 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
That is rather strange, I just looked on my local machine and SERVER_NAME returns 127.0.0.1 whilst HTTP_HOST returns 'localhost'. My VHOST server returns the correct name (sammoffatt.com.au), that said, so does HTTP_HOST. I'll look into putting an option in to change it.

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Sun Jul 06, 2008 7:00 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 25, 2008 1:25 pm
Posts: 5
My host is free one with some weird setup. They disable .htaccess, and lot of php functions - even realpath in php (I had to modify some Joomla files because of that one). So my case may be rather unique.

Anyway the plugin works nicely after I replaced HTTP_HOST with SERVER_NAME.


Top
 Profile  
 
PostPosted: Sun Jul 06, 2008 1:41 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Jul 18, 2006 3:55 pm
Posts: 1028
Thanks Sam for the plugin.

I wonder if there's a way to include it as a core function.

After all, researching, downloading, installing and configuring is a longer process than the original solution ... just adding two lines to the .htaccess file.

_________________
The best-selling Joomla book: http://JoomlaExplained.com
Online and classroom Joomla training: http://OSTraining.com


Top
 Profile  
 
PostPosted: Mon Jul 07, 2008 5:53 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
I've updated the extension to handle both SERVER_NAME as well so if either it or HTTP_HOST matches it will not redirect. I've also added an option to disable it in the backend (enabled by default) and a simple check function with an iframe to validate settings. If you end up with a browser error then something isn't right otherwise it should come up with success.

re: including it into 1.6 (1.5 is out of the question), I'll have a chat with the powers that be about including it and see what they think. It needs a bit of a clean up before it gets into core but I don't see too many issues. If it does get included chances are it'll be almost identical code so if you can test this now and see how it works then that'd be a good start. Finally whilst it may be harder, on platforms that don't have .htaccess files this solution still works as well which is good.

Download here:
http://joomlacode.org/gf/project/pasami ... ge_id=3609

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Mon Jul 07, 2008 1:41 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 20, 2007 1:35 pm
Posts: 15
Location: Melbourne
thanks so much for creating this plugin
im using it on www.PanicIndustry.com

I also have .net .org .tv and it works to redirect them all to .com excellent

_________________
http://www.OSGUI.com
Open Source, Operating Systems, & Graphical User Interfaces. We try to promote Ubuntu Linux and much more.


Top
 Profile  
 
PostPosted: Tue May 12, 2009 12:31 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
Hi Tim,

Great to hear that it works for you, would you also be interested in posting a review or ranking on the JED?

http://extensions.joomla.org/extensions ... 55/details

Cheers,

Sam

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Tue Jun 02, 2009 5:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jun 02, 2009 12:42 pm
Posts: 5
Location: kolkata
this is one simple yet power tweak for SEO which alot of people miss out


Top
 Profile  
 
PostPosted: Sun Jun 28, 2009 9:03 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jun 28, 2009 8:29 pm
Posts: 19
The canonical tag will (is claimed to, at least) solve this issue now. A 301 redirect from either www to without or the other way around is a safer bet though.

_________________
Only literal URLs allowed. See forum rules for details.


Top
 Profile  
 
PostPosted: Mon Jun 29, 2009 10:15 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 13, 2009 6:34 am
Posts: 16
Awesome, helpful, supportive. This plug-in helps!

_________________
-
http://www.VitalBodies.net
Home, Art, Lifestyle, Shop, Tech & News...


Top
 Profile  
 
PostPosted: Wed Jul 22, 2009 10:44 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Apr 20, 2009 2:38 am
Posts: 29
Alledia, thanks for pointing this out. Many people overlook this important factor, and actually can get punished for duplicate content. The pronunciation well that would be pronounced KAH-nahn-nihk-uhl-ih-ZAY-shun for anyone wondering.

:)

_________________
http://www.highrankingseo.net Florida Internet Marketing
http://twitter.com/RikGlaser
Follow Me!


Top
 Profile  
 
PostPosted: Mon Oct 19, 2009 5:04 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 20, 2007 1:35 pm
Posts: 15
Location: Melbourne
Thanks again for this, years later I had to find this plugin again

im still confused abou tit though, what is a .htaccess way of doing this?

_________________
http://www.OSGUI.com
Open Source, Operating Systems, & Graphical User Interfaces. We try to promote Ubuntu Linux and much more.


Top
 Profile  
 
PostPosted: Mon Oct 19, 2009 5:09 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Apr 20, 2007 1:35 pm
Posts: 15
Location: Melbourne
oh no it does not work anymore with 1.5.14

The page isn't redirecting properly




Firefox has detected that the server is redirecting the request for this address in a way that will never complete.








* This problem can sometimes be caused by disabling or refusing to accept
cookies.

_________________
http://www.OSGUI.com
Open Source, Operating Systems, & Graphical User Interfaces. We try to promote Ubuntu Linux and much more.


Top
 Profile  
 
PostPosted: Mon Oct 19, 2009 5:32 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
It works perfectly fine on my 1.5.14 site, I'd look to something else to work out what is going on. Redirect loops occur when you redirect to one place and then back to where you redirected from and around and around until the browser gets dizzy and sits down. There is potentially a configuration alteration somewhere on your side that could have caused it but my 1.5.14 sites are working perfectly fine.

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Wed Nov 25, 2009 6:31 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Aug 21, 2009 2:49 pm
Posts: 13
Location: Melbourne, Australia
Hi Sam,

Thanks for the work you put in.. I used to use a different Canonicalization plugin but thought id give yours a go as the old one i still had to touch the htaccess file.. I downloaded your plugin and when i type in the address i want it pointed to 'www.majorchord.net' it tells me that 'Failure! Domains dont match'.

I clicked rewrite (brand new site so didn't matter if i stuffed up) but it couldn't find a connection.

I am using 1.5.15 and haven't renamed htaccess.txt to .htaccess yet.. do i need to?


Search Engine Friendly URLs: Yes
Use Apache mod_rewrite: No
Add suffix to URLs: No

your help would be much appreciated..

cheers

dub

_________________
my websites: http://www.reflexmedia.com.au and http://www.quotemywheels.com.au


Top
 Profile  
 
PostPosted: Thu Nov 26, 2009 12:28 am 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1318
Location: San Jose, CA, USA
Going from memory, when you're doing the test, you've hit apply first (without enabling the plugin; think that should work properly)? Will have to have a look over the code which is always time consuming. Lots of time!

_________________
Sam Moffatt
Updater, Installer and Authentication Systems
JoomlaCode Backend Systems
Pie.


Top
 Profile  
 
PostPosted: Mon Dec 07, 2009 11:08 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Aug 21, 2009 2:49 pm
Posts: 13
Location: Melbourne, Australia
Hi Sam,

Thanks for the fast reply.. I tried what you suggested.. still showing without the www..

since last time I have amended the site settings as below and renamed the htaccess file

Search Engine Friendly URLs: Yes
Use Apache mod_rewrite: Yes
Add suffix to URLs: No

Can i double check i am doing it all right.. i cold be missing something simple.. I want all domains to have www.

Correct Host: www.gengreen.com.au
Backend enabled: yes

when i click on a menu item for example.. still goes to non-www site

thanks again for your help mate..

cheers

dub

_________________
my websites: http://www.reflexmedia.com.au and http://www.quotemywheels.com.au


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 36 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group