D
D
Dr_Gonzo2018-02-16 07:22:22
Drupal
Dr_Gonzo, 2018-02-16 07:22:22

How to fix duplicate pages on a multilingual site?

The site is in two languages, there is a section in which articles are written. When writing an article, a language is selected (for example, Russian) and the following address is obtained for the published article: site.com/ru/novaya_statya
If I change "ru" to "en" in this address ( site.com/en/novaya_statya), then a Russian-language article will open those. double from the point of view of search engines.
Please tell me what could be the problem and how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2018-02-16
@xmoonlight

At the beginning of the file:

<html xml:lang="ru" 
      lang="ru" 
      dir="ltr">

In the head section:
<meta http-equiv="Content-Language" content="ru" />
<link rel="alternate" href="http://site.com/" hreflang="x-default" />
<link rel="alternate" href="http://site.com/en/" hreflang="en" />
<link rel="alternate" href="http://site.com/ru/" hreflang="ru" />

Described for the Russian-language page. We do the same for all other necessary languages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question