Do you have an
idea or suggestion?

Share a feature, ideas or suggestions to the community. Review the requests and vote.

Create a Request

Duplicate URL for default language

Under Consideration Grozav C. 01/10/2022 - 12:47

Hi,

When changing the language of the interface from the language menu at the top left, the script redirects to the URL like: /langcode/index

Let's take the following situation as an example, we have 2 languages ​​installed on the script, Italian and English, English being the default language:
If we want to change from English to Italian we will be redirected after changing the language to the following path: /it/index if we click for example on the logo that leads to the main page "/" the language remains set to Italian but we will have 3 URLs for the page leading to the same page, namely: "/", "/it/", "/it/index".

It is not ok to have pages with duplicate content, we can be penalized by search engines, Google recommends that we set Canonical URL for the main URL, make 301 redirect to the main URL, the problem is that we have the Canonical tag in all 3 pages but none are identical all have canonical link with current url.

For "/" we have the canonical tag: <link rel="canonical" href="https://domain.tld/
For "/en/" we have the canonical tag: <link rel="canonical" href="https://domain.tld/en/
For "/en/index" we have canonical tag: <link rel="canonical" href="https://domain.tld/en/index

So search engines will understand that all 3 pages are different but with duplicate content which is not ok, I don't think anyone wants 3 URL pages indexed by search engines with duplicate content.

The /langcode/index part should be removed after setting the language cookie with a 301 redirect to the main page if the chosen language is the default one and if it is not the default one redirect to /lancode/ without the "index" part.

And at the canonical tag another function should be found or the current one rewritten to declare the correct URL.
Or the other pages with /index they must no longer be available to access.

Thank you!

Comments (0)

Write a Comment
No comment has yet been made.
Be the first to comment!

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top