News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Where's my 'hreflang'?

Started by EvanGR, October 19, 2013, 15:29:27 PM

Previous topic - Next topic

EvanGR

[Joomla 2.5.14, VM 2.0.24, multilanguage site]

I noticed that VM does not insert an hreflang tag for its pages... (like so) '...rel="alternate" hreflang="en"'.

Joomla does it by default, but you have to link the relevant pages/menu items in the different languages. Virtuemart already knows the relevant product for all languages because all the translations are bundled with each product. So there should be a built-in option for this.

(Please do not ask me to create and manage menu items linking to the hundreds of VM categories and products, and no commercial 3rd party extension for basic functionality, thanks!)

I am willing to modify, at least, the product details template so that it includes the hreflang tag. Any pointers on how to extract the URLs (mainly aliases) for the languages from VM? Thank you...


P.S. By they way, this is very important for SEO because it tells search engines which content is similar in different languages (so you don't get penalized for similar or duplicate content, and get better indexing for international search results)



jjk

#1
Quote from: EvanGR on October 19, 2013, 15:29:27 PM
P.S. By they way, this is very important for SEO because it tells search engines which content is similar in different languages (so you don't get penalized for similar or duplicate content, and get better indexing for international search results)

Who told you that?  ;)

On VM2 product pages the search engines normally already have three language signs (look at the page source code in your browser) they can use:

1. The HTTP Content-Language header, which looks like this: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr" >
2. The actual url including a language tag <base href="http://your-domain/en/category-name/product-name-detail" />
3. The canonical link, also including a language tag, which looks like this: <link href="/your-domain/en/category-name/product-name-detail" rel="canonical" />

Microsoft's Bing search engine first looks at the HTTP Content-Language header, while there is no clear statement from Google whether they use it or not. Google might not use it, because it is possible to add multiple content language headers to single language web pages.

However, Google primarily uses the hreflang for geo-targeting. That means if you have for example rel="alternate" hreflang="en-GB" on your english language website, they might not display it to Google vistors from the USA (en-US), Canada (en-CA), Australia (en-AU) and many other english speaking countries like India, South Africa, etc.

Google doesn't penalize anybody for same content in different languages. Duplicate content is defined as for example duplicates of your website on different domains. In a CMS you can easily have 10 different urls pointing to the same content page, but that's not defined as duplicate content either.

If you still think you need hreflang, you can enable 'Add alternate meta tags' in 'Plug-in Manager: System - Language Filter' in Joomla, which would give you at least an hreflang in your VM category views, for which a menu items exists. (Note: When I tested it shortly on one of my multilanguage websites, it didn't work, because for some reason Joomla mixed up the language tags in the hreflang - so I immediately switched it off again, because I didn't want to confuse the search engines  :D )



Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

EvanGR

Thank you very much, for the detailed reply jjk!

Unfortunately, we need the hreflang mostly on the product pages. It would make most sense there, these are the pages we want to promote (or target) per language/region. And making menu items is not an option for us (=maintenance nightmare).

If I could get the product aliases for each language, from the template PHP code, I could possibly add the hreflang code myself. Do you have an idea on how to get these multilingual aliases from VM via PHP? That would be a good step forward.

Thanks again!

jjk

Quote from: EvanGR on October 21, 2013, 23:28:35 PM
Do you have an idea on how to get these multilingual aliases from VM via PHP? That would be a good step forward.

Sorry, but I don't know how to do that.
Just curious - does the 'Add alternate meta tags' in 'Plug-in Manager: System - Language Filter' work for you on pages which have an associated menu link? If I enable that in Joomla 2.5.14, Joomla mixes up the language hreflang language tags and inserts the wrong language tag from the associated menu item.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

EvanGR

Quote from: jjk on October 22, 2013, 12:11:08 PM
Just curious - does the 'Add alternate meta tags' in 'Plug-in Manager: System - Language Filter' work for you on pages which have an associated menu link? If I enable that in Joomla 2.5.14, Joomla mixes up the language hreflang language tags and inserts the wrong language tag from the associated menu item.

Checked on two J2.5 sites, and it seems to be working right. The alternate hreflang tag is there, and points to the correct URLs in the other languages. btw, I am not using any 3rd party SEF extensions, all Joomla native.



mhuebler

some news about the topic to integrate the alternate href lang into category and product sites ?

<link href="/en/category" rel="alternate" hreflang="en" />
<link href="/de/kategorie" rel="alternate" hreflang="de" />
<link href="/xx/xxxxxxx" rel="alternate" hreflang="xx" />

prokops

I would also like to know if it is possible to add hreflang to the virtuemart generated code or if this functionality should be handled by Joomla !

Cheers,
prokop

jenkinhill

Enable Joomla's System - Language Filter plugin and turn on  Add Alternate Meta Tags
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

prokops

Hi jenkinhill, thanks for your reply

My Language Filter plugin is enabled with the Add Alternate Meta Tags enabled, without any hreflang present in the code.
Even if I make a menu for a product and associate the menus, still no hreflang present in product detail view source.

Is there something else I could try to make Joomla/Virtuemart insert hreflang tags in Virtuemart category and product pages.

Studio 42

#9
Hi prokops,
You can buy my module here : http://shop.st42.fr/en/products/multi-language-for-virtuemart.htm
This have the hreflang tag for google (if the same page exist in other language)
Includes real language switch for product, categories in virtuemart.

It work with core Sef active, but not for 3 party sef system.

Simply try in in the shop itself, and look in the html header.I think, it's what you search.

Cheers,
Patrick

P.S: i have added an option to change hreflang code, you can now disable, use code 2(en) or code 4(en-gb), simply use the updater

lindapowers

#10
Quote from: Studio 42 on April 07, 2015, 12:04:37 PM
Hi prokops,
You can buy my module here : http://shop.st42.fr/en/products/multi-language-for-virtuemart.htm
This have the hreflang tag for google (if the same page exist in other language)
Includes real language switch for product, categories in virtuemart.

It work with core Sef active, but not for 3 party sef system.

Simply try in in the shop itself, and look in the html header.I think, it's what you search.

Cheers,
Patrick

P.S: i have added an option to change hreflang code, you can now disable, use code 2(en) or code 4(en-gb), simply use the updater

Hi Patrick we just recieved an email of google "Incorrect hreflang implementation on your website" .

I checked default Joomla's System - Language Filter plugin and turned on  Add Alternate Meta Tags (I had them Off) In case that affects.

In your module I have href lang to "en".


The error report shows "no return tags" in all virtuemart links:

I noticed something also in the source code:

<link href="http://www.comenaranjas.com/es/tienda/plátanos-bananas-kg.html" rel="canonical" />

  <link href="/ca/botiga/plàtans-i-bananes-kg-detail.html" rel="alternate" hreflang="ca" />
  <link href="/en/shop/plantains-and-bananas-kg-detail.html" rel="alternate" hreflang="en" />

The alternate urls are wrong, they are showing "-detail" when we have removed that suffix.

Regards

vm 3.0.14 j 3.5.1

Studio 42

Hi Manu,
Have you updated ?
If you have something to fix, please contact me in Skype and i check with you.
For suffix disabled, i need to test and add it. This was not possible in old VM releases and this feature is missing, i try to add it to next multi language switcher release.
Regards,
Patrick

lindapowers

#12
Hi Patrick im on 3.0.14 but I tested in 3.0.16

I believe the issue is in core VM cause the loading of one product detail page shows the hreflang alt with the -detail suffix added.

When clicking in your plugin and switching language from the product detail view it changes to the url with the -detail suffix added.

Gonna report it in bug section.

Regards

lindapowers

Hi again Patrick I was wrong. As you say your module is missing the remove suffix option and this causes the error in the alt hreflang.

Studio 42

Hi again Manu ;)
Check your Joomla updates, new release is available for auto update!