4

On our public gatsby website we have two languages: nl and en. Our default language is en, so we have /..., /en/... and /nl/....

So for one piece of content we have the following links:

Now, two of those are identical and all my SEO tools (like Ubersuggest, Hubspot, etc) are complaining about the duplicate title tags & content.

How should this be solved properly? Can we just redirect the /... pages to the /en/... without further SEO impact? And what's the best way to do redirects in Gatsby?

2
3

Regardless of redirects (Saw your comment), if you don't set hreflang annotations and canonicalize pages Google will likely consider them duplicates.

Via document <head>

<head>
 <title>Example.com</title>
  <link rel="alternate" hreflang="en-gb" href="http://en-gb.example.com/page.html" />
  <link rel="alternate" hreflang="en-us" href="http://en-us.example.com/page.html" />
  <link rel="alternate" hreflang="en" href="http://en.example.com/page.html" />
  <link rel="alternate" hreflang="de" href="http://de.example.com/page.html" />
 <link rel="alternate" hreflang="x-default" href="http://www.example.com/" />
</head>

Via headers

Link: <http://example.com/file.pdf>; rel="alternate"; hreflang="en",
      <http://de-ch.example.com/file.pdf>; rel="alternate"; hreflang="de-ch",
      <http://de.example.com/file.pdf>; rel="alternate"; hreflang="de"

Via sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>http://www.example.com/english/page.html</loc>
    <xhtml:link
               rel="alternate"
               hreflang="de"
               href="http://www.example.com/deutsch/page.html"/>
    <xhtml:link
               rel="alternate"
               hreflang="de-ch"
               href="http://www.example.com/schweiz-deutsch/page.html"/>
    <xhtml:link
               rel="alternate"
               hreflang="en"
               href="http://www.example.com/english/page.html"/>
  </url>
...etc

This answer I wrote recently has some useful resources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.