rubben1985 Posted March 2, 2020 Posted March 2, 2020 (edited) Hi everyone, Using semrush (seo tool) to male a SEO audit, it indicates me that most of the urls of my multilingual stores have one common mistake that is creating extra innecessary redirections (that hurts SEO as it difficult crawl). The fault is from the main logo in multilingual environment because instead of linking the correct homepage version (domain/language/) is linking the main directory (domain/). Example: www.shop.com/en/ Imagein we are in www.shop.com/es/product1. The logo has the link "www.shop.com". When you clic on it, it goes to www.shop.com and later automatically redirects to www.shop.com/en/ instead of going directly to www.shop.com/es/ so there is an innecesary redirect. If the logo would redirect to the same version, it would help a little the SEO of every TB store. Is this something simple to do? In PS forum they did something similar with the logo image (change the image according to the language). i suppose that cod could be similar but being used to adapt the link to the language https://www.prestashop.com/forums/topic/46690-solvedhow-to-change-homepage-logo-refering-to-language/ I think this is an improvement that could be also good to implemented in the core. Any ideas? Edited March 3, 2020 by rubben1985
rubben1985 Posted March 2, 2020 Author Posted March 2, 2020 as appreciation, it should be compatible with stores without language... if that would be possible that would make it compatible with any store and multistore and could be implemented in the core to improve SEO health of every TB site
rubben1985 Posted March 3, 2020 Author Posted March 3, 2020 (edited) well, I made some research and "empiric" try and error and I am closer but not Idea how to continue. In /theme/header.tpl I have change the line making reference to the logo link from: href="{$base_dir_ssl}" to href="{$base_dir_ssl}{$lang_iso}/" This works in shops with languages, but not in those with only one because it adds the language without needing it. My case is: I have a multistore. STORE 1: lesielle.com/int/ with a few languages-> lesielle.com/int/es/ , lesielle.com/int/en/, lesielle.com/int/de/... STORE 2: lesielle.com/es/ has only one language. (IMP: The /es/ does not make reference to the language, is just the subdirectory where the store is located. the same as the "int" in the store 1) With the modification I made. It works perfect in STORE 1 because it ads the language to the main directory. But in STORE 2, doesn't because it ads the language when it is not needed it and the link that creates is lesielle.com/es/es/ Any idea what code to use to only ad the /language/ when the store has more than one language? I suppose it is something similar of what TB is already doing when creating the home page url (only adding the language subdirectory one it is a multilanguage store) EDIT: if that would not be easy, and alternative would be to apply "my modification" to only certain ID stores. This would serve me, but would not be good to implement as core functionality as would need manual adjustment. Edited March 3, 2020 by rubben1985
datakick Posted March 3, 2020 Posted March 3, 2020 Try this <a href="{$link->getPageLink('index')|escape:'html':'UTF-8'}" title="{$shop_name|escape:'html':'UTF-8'}"> ... </a> 1 1
rubben1985 Posted March 4, 2020 Author Posted March 4, 2020 14 hours ago, datakick said: Try this <a href="{$link->getPageLink('index')|escape:'html':'UTF-8'}" title="{$shop_name|escape:'html':'UTF-8'}"> ... </a> It works! I would suggest that you include this in future TB versions. I do not see any cons, but only advantages for search engines and health site puntuations
datakick Posted March 4, 2020 Posted March 4, 2020 1 hour ago, rubben1985 said: It works! I would suggest that you include this in future TB versions. I do not see any cons, but only advantages for search engines and health site puntuations I agree, this will be included in niara 2 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now