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.

  <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/">

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.

  • 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. – usernameabc Dec 3 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! – Henry Visotski Dec 3 at 18:33
  • 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. – GDav Dec 4 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. – Henry Visotski Dec 4 at 15:42

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.