Author Topic: Alternate Meta Tags incorrect  (Read 893 times)


  • Jr. Member
  • **
  • Posts: 124
Alternate Meta Tags incorrect
« on: June 12, 2017, 16:03:59 pm »
I am using Alternate Meta Tags=ON in language plug-in. All Joomla pages have correct Alternate links, only the VM categories are incorrect. All links are the same and using the default front-end selected language and not the right alternate link.
For example:
<link href="nl/product-categorieen/comfort/zijwindscherm-sets.html" rel="alternate" hreflang="nl-NL" />
<link href="de/product-categorieen/comfort/zijwindscherm-sets.html" rel="alternate" hreflang="de-DE" />
<link href="en/product-categorieen/comfort/zijwindscherm-sets.html" rel="alternate" hreflang="en-GB" />

As you can see the link includes the right language alias, but the link is the alias from the default site language, in our case NL.
It should be something like this:
<link href="nl/product-categorieen/comfort/zijwindscherm-sets.html" rel="alternate" hreflang="nl-NL" />
<link href="de/produktkategorien/komfort/windabweiser.html" rel="alternate" hreflang="de-DE" />
<link href="en/products-categories/comfort/side-wind-deflectors.html" rel="alternate" hreflang="en-GB" />

If I switch to English in front-end, all alternate links are in English:
<link href="/products-categories/comfort/side-wind-deflectors.html" rel="alternate" hreflang="en-GB">
<link href="nl/products-categories/comfort/side-wind-deflectors.html" rel="alternate" hreflang="nl-NL">
<link href="de/products-categories/comfort/side-wind-deflectors.html" rel="alternate" hreflang="de-DE">

Any idea how to fix this?
Google is is of course giving 404 errors on this.
NOTE: if you are on the website and use the language icon to switch to another language it links to the right page, so those links are correct.

Using J 3.6.5
and VM


  • Jr. Member
  • **
  • Posts: 124
Re: Alternate Meta Tags incorrect
« Reply #1 on: June 16, 2017, 20:35:00 pm »
Is this a bug?
Does anybody have the same behaviour with J3.6.5 and VM


  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3299
  • using Matomo instead of Google Analytics
Re: Alternate Meta Tags incorrect
« Reply #2 on: June 17, 2017, 11:03:18 am »
You should consider to update your Joomla and VirtueMart versions. Joomla 3.6.5 has serveral security vulnerabilities which are fixed in the latest version.
With J3.7.2 and VM 3.2.3 I don't have your issue.
Example (tested locally - I don't use it on my live website):
   <link href="...://mysite/de/automobilkunst" rel="alternate" hreflang="de" />
   <link href="...://mysite/en/automobile-art" rel="alternate" hreflang="en" />

Something else to consider - en-GB, etc consists of a language code 'en' and a country code 'GB'. Google uses the country code for geo-targeting. 'en-GB' tells Google that the page is specifically made for English speaking people in the United Kingdom. If you use just 'en' (without '-GB'), it is more likely that Google will list that page also for searches from other English speaking countries, like USA, Australia, etc.
Non-English Shops: Are your language files up to date?


  • Jr. Member
  • **
  • Posts: 124
Re: Alternate Meta Tags incorrect
« Reply #3 on: June 26, 2017, 13:56:02 pm »
JJK, thx for the tip and reply.
Unfortunately upgrade isn't that easy due to custom made components, a lot of external components and a commercial template!