After writing this I found out my approach was incorrect. I have since removed the code as it was not useful.
Dan’s team was kind enough to point me to Virgin Australia‘s site. If you inspect the source and search for hreflang, you’ll see how it should be done.
After seeing the excellent talk by Dan Petrovic at the Melbourne WordCamp, I went to find out more about the <link rel=”alternate” hreflang=”en-AU” href=”http://somesite.com.au/” />. He has an article describing it. Essentially if you have multiple sites that have similar content (but not exactly the same) then you can instruct google that the sites serve different regions by using the rel=alternate hreflang=”en=gb” options for the link tag.
A common scenario that you might find this useful would be in online stores where there is a different store for each country.
eg. for site somesite.com.au you want a <link> tag like this:
<link rel=”alternate” hreflang=”en-AU” href=”http://somesite.com.au/” />
and for somesite.com you might want a tag like this:
<link rel=”alternate” hreflang=”en-US” href=”http://somesite.com/” />
and you want to remove the rel=”canonical” option too.
I couldn’t find a plugin that would implement this in WordPress so I wrote one and put it up on github. Yoast does not have an option for this as far as I can tell.
At some point I might put it up on wordpress.org too if it seems like there is interest in it.