Hi, first time in this forum.
I have noticed an important issue and I'm surprised that nobody has given focus to it, so no solution found in internet yet.
I want to create a multilingual site (greek and english) and I have enabled "Add Store Code to Urls" and created two store views with the corresponding codes en (english) and el (greek).
I have set up greek as default.
The issue is that the system gives the exact same page if you go to example.com/page and if you go to example.com/el/page. This of course is 100% duplicate content and will be for sure penalized!
So how can we solve this?
Possible solutions:
1. redirect all pages with /el/ to the one without it
2. redirect all pages without code to /el/ (my preference)
3. block access to pages without code
I'm using nginx.
How can achive the above? What implications we may have?
I would prefer to achieve solution 2. but if I do it with nginx redirects then if I hit /admin this will direct to /el/admin and this will create an infinite loop.
How all the people with multilingual sites solve this major issue? Am I missing something? I haven't found adequate solutions in internet
Please take reference from below url:
https://magefan.com/blog/create-multiple-stores-in-magento-2
It may help you.
Thanks
Bhanu Periwal
Hello @myrbourfak618d
For example, to copy all categories and products from store_id=2 to store_id=8.
We'll have to modify this tables:
catalog_category_entity_text
catalog_category_entity_varchar
catalog_category_entity_int
catalog_product_entity_text
catalog_product_entity_varchar
catalog_product_entity_int
Then we'll have to run this sql query for all 6 tables below:
INSERT INTO `catalog_<TYPE>_entity_<DATATYPE>` (
`attribute_id`,
`store_id`,
`entity_id`,
`value`
)
SELECT
`attribute_id`,
"8",
`entity_id`,
`value`
FROM
`catalog_<TYPE>_entity_<DATATYPE>` src
WHERE src.`store_id` = 2 AND src.value IS NOT NULL
ON DUPLICATE KEY
UPDATE
`catalog_<TYPE>_entity_<DATATYPE>`.`value`
------------------------------------------------
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"
Hi @Bhanu Periwal, how does this article addresses the issue of duplicate content?
I'm not sure you understood the issue! The issue is the duplicate content (or duplicate path) if you create two store views.
Hi @syedhasan ,
I don't understand what you are talking about. Are you sure you understood the issue? How can I make magento don't have the same page for the url with the language code and for the url without it?
I'm a bit frustrated from the 0 actual answers on this important subject! New to magento was hoping the community to be more active...
In case if anyone is looking for solution for this issue, I have posted my solution in below post :