Jump to content

hreflang and canonical links creation on prestashop 1.6


Recommended Posts

Hello,

 

We did as instructed and installed properly. We found that if canonical option is enabled dissapears hreflang from code.

 

Regards.

hreflang code should appear only in the canonical page, non-canonical pages have not to display the code (see the image in the description on github)

.. is it this the behaviour you have?

Edited by ZiZuu (see edit history)
Link to comment
Share on other sites

I am a bit confused now.

 

On index page I can see in any language if the canonical option is not selected in backoffice (in your module) if I select it, then it dissapears at all.

 

Thanks.

 

You can see it in action at www.tictacarea.com

It seems there is an issue .. please use this issue on github in order to debug and handle it better.

 

 

 

thank you

Edited by ZiZuu (see edit history)
Link to comment
Share on other sites

i downloaded lastest version but not compatible with 1.6.0.6 ?

We are waiting for feedback from another user .. use the "dev" branch .. it should work

 

If you report it works we are going to deploy a new release having a less stricter version check

 

Thank you

  • Like 1
Link to comment
Share on other sites

We are waiting for feedback from another user .. use the "dev" branch .. it should work

 

If you report it works we are going to deploy a new release having a less stricter version check

 

Thank you

 

(about dev version) prestashop says "module loaded successfully" but then the module doesnt appear

Link to comment
Share on other sites

(about dev version) prestashop says "module loaded successfully" but then the module doesnt appear

I'm just releasing 1.1.4  .. remove the module, be sure to remove the module dir in modules/ too and install this release (in a few minutes)

Link to comment
Share on other sites

  • 2 weeks later...

Hi Zizuu,

 

Thank you for your contributions!

 

I have one question:

I have domain.be and domain.nl. Both websites make use of only 1 language. Google uses separate language codes such as nl-be and nl-nl.

Would there be an easy fix to point domain.be to nl-be and domain.nl to nl-nl?

 

Thank you,

 

Christiaan

Link to comment
Share on other sites

Domain.be iso: nl-be

Domain.nl iso: nl-nl

 

You can check pdashop.be for instance. A major store that implements the hreflang in this way. Thanks for replying btw.

 

Ah ok .. got your point .. you want the ability of use the full iso-code into the hreflang meta tag

 

But this is a dangerous practice as if your nl-be and nl-nl contents were not unique (i.e. they seem duplicates) then it will impact negatively on SEO ..

 

Moreover it is necessary to include a language-only tag too (nl) .. but to which content should it to be pointed ?

A user speaking nl but not being in be nor in nl which version of the page should be pointed to ?

 

Just adding the tags is trivial, making it cleverly is a bit more complicated

 

I have created a new issue for this request (implement https://moz.com/learn/seo/hreflang-tag ) .. will take care asap .. 

Edited by ZiZuu (see edit history)
Link to comment
Share on other sites

ok,

 

i understand. There is a mistake.

When you are on pages with pagination. ONLY in page one, the l

i class="pagination_next"

is rel="next" and all the other li class="pagination_next" and li class="pagination_previous" are nofollow :(

 

How to solve it ? :(

 

Best regards

Link to comment
Share on other sites

Hi,

 

Thank you for your work !

 

For cons, the module does not seem to manage rel "prev" and rel = "next" on pages with pagination?

How to manage it?

 

Best regards

 

 

Hi

 
No the module doesn't handle it as pagination should be handled by the theme
 
Default-bootstrap (PS default theme) handles pagination properly since 1.6.1.0 afaik
 
Best regards

Excuse me, it's a pagination.tpl problem.

 

Sorry

 

 

eheh .. QED ;)

 

No problem, you are welcome .. have a nice day

Link to comment
Share on other sites

Hi,

 

There is still a problem with pagination.

Indeed, overall for a 4 pages with pagination, it should work like this:

 

Page 1 

<head>
    ...
    <link rel="next" href="articles-batman-2" />
    <link rel="canonical" href="articles-batman-1" />
    ...
</head>
 
Page 2
<head>
    ...
    <link rel="next" href="articles-batman-3" />
    <link rel="prev" href="articles-batman-1" />
    <link rel="canonical" href="articles-batman-2" />
    ...
</head>
Page 3
<head>
    ...
    <link rel="next" href="articles-batman-4" />
    <link rel="prev" href="articles-batman-2" />
    <link rel="canonical" href="articles-batman-3" />
    ...
</head>
and Page 4
 
<head>
    ...
    <link rel="prev" href="articles-batman-3" />
    <link rel="canonical" href="articles-batman-4" />
    ...
</head>
 
and with the module, we always are with <link rel="canonical" href="articles-batman" />   :(
 
PS : prestashop did anything with pagination.tpl and rel tags. It's hard to had this in head ? Maybe a next module version ?
 
Best regards
Link to comment
Share on other sites

 

Hi,

 

There is still a problem with pagination.

Indeed, overall for a 4 pages with pagination, it should work like this:

 

Page 1 

<head>
    ...
    <link rel="next" href="articles-batman-2" />
    <link rel="canonical" href="articles-batman-1" />
    ...
</head>
 
Page 2
<head>
    ...
    <link rel="next" href="articles-batman-3" />
    <link rel="prev" href="articles-batman-1" />
    <link rel="canonical" href="articles-batman-2" />
    ...
</head>
Page 3
<head>
    ...
    <link rel="next" href="articles-batman-4" />
    <link rel="prev" href="articles-batman-2" />
    <link rel="canonical" href="articles-batman-3" />
    ...
</head>
and Page 4
 
<head>
    ...
    <link rel="prev" href="articles-batman-3" />
    <link rel="canonical" href="articles-batman-4" />
    ...
</head>
 
and with the module, we always are with <link rel="canonical" href="articles-batman" />   :(
 
PS : prestashop did anything with pagination.tpl and rel tags. It's hard to had this in head ? Maybe a next module version ?
 
Best regards

 

 

Hi,

  the pagination has to be handled by the theme AFAIK .. so if your theme is correctly handling pagination but meta canonical doe not see it we could have an issue ..

 

No, this module will not handle pagination, as I think it is not the right way to do it ..

 

Please gimme a live URL to inspect your issue .. furthermore please report your PS version, your module version and if you have clena URL or third party modules handling IDs enabled

 

Please open an issue on GitHub in order to make it possible to track the problem and possibly find a solution

 

Thank you

 

Link to comment
Share on other sites

hi,

 

the url is http://www.millesime-online.com/fr/bordeaux/

 

PS v1.6.1.1, ZiZuu SEO ToolKit v1.1.5, Clean URLs v0.42 - par ha!*!*y

 

an issue on github.....prestashop or zizuu ?

 

Thank you very much

 

What about to try our zzClenaURLs? we have done a lot of improvement to the module you are using ... 

 

A GitHub issue https://github.com/ZiZuu-store/zzSEOtk/issues

Edited by ZiZuu (see edit history)
Link to comment
Share on other sites

i just have installed zzcleanaurls, thank you.

 

I post a github issue.

 

canonical tag with always the first page is a big problem no ? bots don't scroll the others pages ?

 

Best regards

 

I think the real facts are different .. but let's continue on the github issue :)

Link to comment
Share on other sites

PS : its maybe a simple blog problem....:/

 

 

Oh no sorry .. zzCleanURL does not support modules controllers .. I'm working on its implementation just this days .. 

 

If you have simple blog installed you can't use my clean URL module until I release the next version .. sorry

Link to comment
Share on other sites

up!

 

Let me come to the news.

Have you been able to move forward? 

 

- created a new test environment from scracth (new vhost, new SSL cert, new everything)

- installed ONLY simple blog and configured

- working 

 

When thins will be done you will know as everybody .. I'll release a new version

 

Be patient plz

Link to comment
Share on other sites

  • 1 month later...

- created a new test environment from scracth (new vhost, new SSL cert, new everything)

- installed ONLY simple blog and configured

- working 

 

When thins will be done you will know as everybody .. I'll release a new version

 

Be patient plz

Hi, what about the index (home) page?

When I check after installation it seems not to be there at index page.

 

//Patrik

Link to comment
Share on other sites

  • 4 weeks later...

ZiZuu  Your module works fine - thank u

but... it's doing cached file for every single page in [cache/smarty/cache] x language x multistore - I have 1GB files for now - it's no problem if you have your own VPS but on shared hostings?

 

 

Hi @hatak,

  thank you for reporting.

 

1GB ?! Wow .. how many pages do you have? .. 

 

Can you please fill an issue on GitHub .. we could implement a switch to turn caching on/off .. will inspect?

 

Thank you

Link to comment
Share on other sites

ZiZuu 1700 products + cms,blog etc and 2 languages = 4000 files ....and it is for one shop

 

let's admit you have 10 (!) shops .. you'll have ~ 40 000 files .. each one should be ~ 1-2 Kb

 

so you should have 80 000 Kb .. that is 80Mb .. quite far from 1Gb

 

 

Can you open an issue and help us to go deeper?

Edited by ZiZuu (see edit history)
Link to comment
Share on other sites

first of all, I made mistake, I was looking for number of files and general quota of cache folder - it's turned out your files take only 200MB

second of all, you're right every file is 1kb but you have forgot every empty folder has 4kb - in this case 44kb for one of your file :P

and the last thing: why do you push us to use github? is it wrong to write on this forum? :)

Link to comment
Share on other sites

 

first of all, I made mistake, I was looking for number of files and general quota of cache folder - it's turned out your files take only 200MB
second of all, you're right every file is 1kb but you have forgot every empty folder has 4kb - in this case 44kb for one of your file :P
 
 
and the last thing: why do you push us to use github? is it wrong to write on this forum? :)

 

 

 

No it isn't .. but I can't handle issues on a plethora of platforms .. so, if a post raises a SW issue and somebody wants it to be handled and solved then a GH issue has to be created to allow me to track and solve it

Link to comment
Share on other sites

  • 3 weeks later...

There is a serious problem with this module in combination with prestablog module

For EG: when the blog url is like this: domain.com/en/blog/artikel-12.html the canonical tag will look like this: domain.com/en/module/prestablog/blog it should be domain.com/en/blog/artikel-12.html 

 

So you will crush your complete seo power from your blog..

Edited by mark-b (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

There is a serious problem with this module in combination with prestablog module

For EG: when the blog url is like this: domain.com/en/blog/artikel-12.html the canonical tag will look like this: domain.com/en/module/prestablog/blog it should be domain.com/en/blog/artikel-12.html 

 

So you will crush your complete seo power from your blog..

 

 

Hi,

  thank you for your feedback.

 

Can you please open an issue on the module page on GitHub https://github.com/ZiZuu-store/zzSEOtk/issues ?  

Link to comment
Share on other sites

  • 1 month later...

I did a small modification for blocklanguage

it's working with ssl, every page including blog, multishop as well.

 

make a file hreflang.tpl

<!--  START hreflangs by hatak  -->
{if count($languages) > 1}
{foreach from=$languages key=k item=language name="languages"}
				{assign var=indice_lang value=$language.id_lang}
				{if isset($lang_rewrite_urls.$indice_lang)}
					<link rel="alternate" hreflang="{$language.iso_code|escape:'html':'UTF-8'}" href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}">
				{else}
					<link rel="alternate" hreflang="{$language.iso_code|escape:'html':'UTF-8'}" href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}">
				{/if}
{/foreach}
{/if}
<!--  END hreflangs by hatak -->

and put in modules/blocklanguage/ 

 

in blocklanguage.php add this line:

	      return $this->display(__FILE__, 'hreflang.tpl');

in public function hookDisplayHeader

 

that's it .enjoy!

Link to comment
Share on other sites

I did a small modification for blocklanguage

it's working with ssl, every page including blog, multishop as well.

 

make a file hreflang.tpl

<!--  START hreflangs by hatak  -->
{if count($languages) > 1}
{foreach from=$languages key=k item=language name="languages"}
				{assign var=indice_lang value=$language.id_lang}
				{if isset($lang_rewrite_urls.$indice_lang)}
					<link rel="alternate" hreflang="{$language.iso_code|escape:'html':'UTF-8'}" href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}">
				{else}
					<link rel="alternate" hreflang="{$language.iso_code|escape:'html':'UTF-8'}" href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}">
				{/if}
{/foreach}
{/if}
<!--  END hreflangs by hatak -->

and put in modules/blocklanguage/ 

 

in blocklanguage.php add this line:

	      return $this->display(__FILE__, 'hreflang.tpl');

in public function hookDisplayHeader

 

that's it .enjoy!

Hi, I added this but now I got errors in webmaster tools saying:  "no return tags"

So something is not right on this.

 

//Patrik

Link to comment
Share on other sites

it has to be from your earlier module or whatever. See the dates of indexing these errors.

We added that code the 19th of feb, and the error started the 26th feb, and they are 7 errors.

The errors earlier are a module we first added and that was a very bad one.

 

(see image)

 

//Patrik

post-356552-0-39367200-1456699495_thumb.jpg

Link to comment
Share on other sites

firstof all click on >> and see the dates there

second of all small amount of errors must be, bot is not super smart :P

it's because sometimes bot enter to a page from url with ? mark or # (colours or number of page) and it's expecting hreflang with the same extra ?# parrametters

 

You can always buy some module with extra funcionality :)

Link to comment
Share on other sites

firstof all click on >> and see the dates there

second of all small amount of errors must be, bot is not super smart :P

it's because sometimes bot enter to a page from url with ? mark or # (colours or number of page) and it's expecting hreflang with the same extra ?# parrametters

 

You can always buy some module with extra funcionality :)

Hatak is right, that errors comes from urls with "parameters" there is no solution but the canonical links (and sef urls) as far as I know.

Link to comment
Share on other sites

firstof all click on >> and see the dates there

second of all small amount of errors must be, bot is not super smart :P

it's because sometimes bot enter to a page from url with ? mark or # (colours or number of page) and it's expecting hreflang with the same extra ?# parrametters

 

You can always buy some module with extra funcionality :)

So this is how it looks today, it´s increasing :-(

 

post-356552-0-19097100-1456848223_thumb.jpg

post-356552-0-08507000-1456848044_thumb.jpg

Link to comment
Share on other sites

<!--  START hreflang on pages  -->
{if $page_name == 'category'}
{foreach $languages as $lang}       
<link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getCategoryLink($smarty.get.id_category, null, $lang.id_lang,null,null )}" />	   
{/foreach}
{/if}

{if $page_name == 'product'} 
{foreach $languages as $lang}       
<link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getProductLink($smarty.get.id_product, null, null, null, $lang.id_lang, null, 0, false)}" />	   
{/foreach}
{/if}

{if $page_name == 'cms'} 
{foreach $languages as $lang}       
<link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getCMSLink($smarty.get.id_cms, null, false, $lang.id_lang)}" />	   
{/foreach}
{/if}

{if $page_name == 'contact'} 
{foreach $languages as $lang}       
<link rel="alternate" hreflang="{$lang.language_code}" href="{$link->getPageLink(contact, null, $lang.id_lang, null, null, null)}" />	   
{/foreach}
{/if}

{if $page_name == 'index'}
{foreach $languages as $lang}       
<link rel="alternate" hreflang="{$lang.iso_code}" href="{if $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}{$lang.iso_code}/"/>
{/foreach}
{/if}



<!--  END hreflang on pages  -->

Maybe this will help

  • Like 1
Link to comment
Share on other sites

well, taking again the issue of the no return tag, I've thought something about the .htaccess file, it should be possible to catch all the parameters of every url? if so, it should be possible to handle the various errors and redirect all the calls to the url without parameters, isn't it possible? (just my 2 cents)

Link to comment
Share on other sites

actually there is no difference, that code is from the module... I don't catch your question.

you have posted the module PHP code also in another thread... So basically you had the hreflang module... I don't get the problem.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hi guys,

 

so based on what I read here, hreflang tags should work on homepage as well, shouldn't they?

 

1. http:/.....(mysite)     Reciprocal not found 2.   English   We can't found link on alternate location! 3.   Slovak   We can't found link on alternate location!

 

and when I open International Targeting in Webmaster Tools, I get "Your site has no hreflang tags."

 

However, when I check a direct product page on flang testing tool, it finds alternate locations just fine.

 

Any idea?

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Works perfectly in multistore, love it!

 

Thanks for feedback.  This module was spun off this work, not that I want you to buy it, but it's pretty cool.

[Module] International Language Detect & SEO Friendly URL

 

 

We could see why the proper solution was not out there because google messes up original idea...fixed it...by then experts say 'not' to use.

 

Now we think it's ok to get back in the pool again. :)

 

Happy day, el

Link to comment
Share on other sites

this module doesn't work for me,

I installed and the page become all white.

 

I had to restore the backup. be careful and make backup of database and files b4 installing it.

I'll try to figure out what is going wrong.

Link to comment
Share on other sites

this module doesn't work for me,

I installed and the page become all white.

 

I had to restore the backup. be careful and make backup of database and files b4 installing it.

I'll try to figure out what is going wrong.

 

you should post what module you loaded...there are many pages or rather useless information and several different modules...my idea for you is if the module is not 1) proven 2) transparent, in that it has standalone forum topic with 'nothing' but praise, then don't load it.  happy day, el

Link to comment
Share on other sites

is this.

 

please enable PrestaShop debug mode and  let us know issue.  I cannot imagine how this could cause issue...I think like over 200 downloads to date.  It's just a hook..lol

 

also for best results post in module topic here:

https://www.prestashop.com/forums/topic/526599-free-module-prestashop-seo-localization-google-hreflang-pro/

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Hello,

 

i am trying to put the hreflang links on my prestashop installation but with every module i've used i end up with the same problem in homepage, since i have two languages installed, the default one do not come with the language uri /it/. The link in the homepages instead are still published with the /it/ and /en/ uri, where the homepage in ita is without it.

This drive to an error in the link alternate href in the eng home to the ita.

What i need is tu publish the default homepage links without the /it/ uri.

 

Regards,

 

G.

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

Hi, 

 

I added your module and see that the hreflang is added when i check the code from my page:

 

 rel="alternate" hreflang="nl-nl" href="

 

So this is working with the module.

 

But when i check it online with a hreflang tool i see backlink errors. Any idear what i can do to resolve this.. See image.

 

Regards, Bernhard.

post-24432-0-66095600-1494253619_thumb.jpg

Edited by frontend (see edit history)
Link to comment
Share on other sites

usually it takes some time for Google to index again the page, this could be the issue.

on the other hand, if this problem persist, just feel free to contact me, I'll take a look to the site and see if there anything wrong.

(feel free to contact me by using the contact form on my site).

Link to comment
Share on other sites

usually it takes some time for Google to index again the page, this could be the issue.

on the other hand, if this problem persist, just feel free to contact me, I'll take a look to the site and see if there anything wrong.

(feel free to contact me by using the contact form on my site).

Thank you, i have just send you a message through your website.

Link to comment
Share on other sites

  • 2 months later...

not yet, I'm actually testing a multistore solution which will be ready in about a week from now.

Hi, this is exactly what i was looking for! did you finish the multistore solution?  :rolleyes:

I have 1-2 languages per multistore (all of them different languages of course) so I really want to inform search engines about hreflang different available versions in the differents domains.

 

Regards

Link to comment
Share on other sites

  • 1 month later...

Hi.

 

Hello, thank you for this module. On a multi-shop, I have three shops open, and two closed. In each of the pages, one sees the hreflang multiplied by all the languages, but also multiplied by all the shops (even closed). And this even when the product is not published in the shop. I installed the stable version in a prestashop 1.6.1.14  wooow

 

Best regards

Link to comment
Share on other sites

Hi.

 

Hello, thank you for this module. On a multi-shop, I have three shops open, and two closed. In each of the pages, one sees the hreflang multiplied by all the languages, but also multiplied by all the shops (even closed). And this even when the product is not published in the shop. I installed the stable version in a prestashop 1.6.1.14  wooow

 

Best regards

Hi,

I am in the same situation as you. I solved using this module:

https://www.johanncorbelconsulting.com/2-multi-hreflang.html

 

Works like a charm, and the developer give very good technical service.

 

I hope it helps

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...