Multilingual Website

Question: If you were to build a small, multilingual website with 3 languages, would you rather do everything in one blocs file or have a separate blocs file for each language and the respective pages in subfolders?
And does this make a difference in terms of SEO or is there a risk of duplicate content?

Thanks!

I would do

.domain.com/lang/

To avoid issues with duplicate content and to ensure search engines show the right language version to the user, use the rel=“alternative” and hreflang=“lang” attributes in the header.

eg.

   <link rel="alternate" hreflang="en" href="http://example.com/en/" />
   <link rel="alternate" hreflang="fr" href="http://example.com/fr/" />

You also need to make sure each language page has the canonical tag correct also. Unfortunately Blocs doesn’t make this very easy to implement for this use case. eg one project.

2 Likes

… and the default one to directly serve a user with a non defined language
<link rel="alternate" hreflang="x-default" href="https://example.com/en" />

1 Like

Thank you!

1 Like