5

We are using a tool called SEMRush where it is flagging that the en and x-default values for the hreflang are causing conflicts.

Should both en and x-default be included for the hreflang tags?

This is what we have now.

<html>
<head>
  <link rel="alternate" hreflang="de" href="https://de.example.com/">
<link rel="alternate" hreflang="en" href="https://www.example.com/">
<link rel="alternate" hreflang="x-default" href="https://www.example.com/">
<link rel="alternate" hreflang="es" href="https://es.example.com/">
</head>
<body>
 ....
</body>
</html>

2 Answers 2

2

Your implementation is correct. The tool you're using is either hinting that you may want to double check your setup, or it is plain incorrect in calling this out.

If you go through the Yoast Hreflang Guide, you'll note the "hreflang x-default" section, closer to the bottom. Here's the relevant part:

In this case, the x-default link would point to the same URL as the de one. We wouldn’t advise you to remove the de link though, even though technically that would create exactly the same result. In the long run, it’s usually better to have both as it specifies the language of the de page – and it makes the code easier to read.

Replace "de" with "en" and you basically have your example. Thus, I wouldn't worry about it.

4
  • 1
    i adjusted the question to remove ambiguity and limit it to just SEMrush. The Yoast Hreflang guide got me what I needed to know. Commented Dec 3, 2019 at 18:28
  • Thanks for the heads up, @usernameabc - I also updated my reply to reflect your update, by removing the outdated sentence. Glad the guide helped! Commented Dec 3, 2019 at 18:33
  • 1
    Worth pointing out that what is quoted is a 3rd party's (Yoast's) opinion of what Google intends. I'd argue their position is at best questionable. They imply that a German language page would be served to someone searching in English — highly improbable — and do so without any evidence.
    – GDVS
    Commented Dec 4, 2019 at 9:52
  • Agree that they probably should have used regions (en-us vs en-gb, for example) to illustrate their point, @GDav. But the point itself - using one of the languages both as its own entry and as a catch-all - is sound. Also, if a site doesn't have an English version, they can choose to send English or other speakers to the German one. In terms of authority, they're still the top SEO plugin for WordPress. Finally, there are also other online sources that list the same solution; I just chose Yoast because of their longevity in the WordPress SEO space. Commented Dec 4, 2019 at 15:42
1

I am not sure @Henry's reply is accurate nor Yoast's. Googles official announcement when they "rolled out" the x-default clearly states that x-default is to be used for a page that does not target any language or location. They actually mention this twice at their short post.

It seems that every URL gets 1 hreflang the same way it gets 1 canonical. Even though the effect might be similar google will have 2 signals, one says that the page targets English and the other that the page targets nothing.

Obviously google is able to identify the language of the doc itself independently of the hreflang. So to repeat what google said, x-default is for pages designed to be international.

If you want to make your "en" page international well that's fine, but then I don't see the point of adding conflicting "en" tag. On the other hand you could argue that without "x-default" google would pick what it thinks is best for the user which sometimes can be better than what you picked.

For example say you are a French living in Germany that does not speak English (note that you are targeting "de", which is what your browser setting is, not Germany). Without x-default most probably you will see "de" but with x-default you will see the English.

So basically the question is do you want to force English to say Swedish people or you want to let google show whatever thinks is best? For your case it seems to be not so important, but still you might want the control.

X-default is particularly important for sites that utilize same-language multiple locations, x-default is important as you don't want a page that is optimized for say Australia to be showing up for people in India, it makes no sense. So you create an x-default version to make sure google shows the appropriate pages to non-targeted locations.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Sep 19, 2022 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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