Inicio > Blog > Tutoriales > Cómo solucionar el error “Tu sitio no tiene etiquetas hreflang” en Google Search Console

Cómo solucionar el error “Tu sitio no tiene etiquetas hreflang” en Google Search Console

Por Colín
Última actualización: 17 de enero de 2024

¿Has visto una advertencia en Google Search Console que dice “tu sitio no tiene etiquetas hreflang” pero no estás seguro de qué significa y qué debes hacer para solucionarlo?

Si su sitio web ofrece múltiples versiones de su contenido para diferentes idiomas y/o ubicaciones de lectores, es esencial que agregues etiquetas hreflang con el formato adecuado al código de tu sitio.

Si ves este error en Google Search Console, significa que Google no ha podido detectar estas etiquetas hreflang, ya sea porque no las has añadido o porque las has añadido incorrectamente.

¡Pero no te preocupes! Esta guía va a cubrir todo lo que necesitas saber para añadir etiquetas hreflang a tu sitio web y solucionar el error en Google Search Console.

Esto es lo que puede esperar de este artículo:

  • Una introducción general a las etiquetas hreflang
  • ¿Qué sitios necesitan usar etiquetas hreflang?si tu sitio no encaja, esta advertencia no te importa)
  • Qué significa el error “Su sitio no tiene etiquetas hreflang”
  • Cómo solucionar el error “Su sitio no tiene etiquetas hreflang” manualmente o con el plugin gratuito TranslatePress para WordPress

¿Qué son las etiquetas hreflang?

Las etiquetas hreflang son pequeños fragmentos de código oculto que te permiten indicar a Google y a otros motores de búsqueda qué idioma y región geográfica está targeting cada versión de una página.

Son especialmente importantes para los sitios web multilingües porque te permiten vincular fragmentos de contenido entre sí mientras especifican el idioma y la configuración regional de cada versión.

Por ejemplo, digamos que tienes una publicación —llámala “Hello World”— que está disponible en tres idiomas diferentes: inglés, español y alemán.

Las etiquetas hreflang te permiten comunicar la siguiente información:

  • La versión en inglés de la publicación está en yoursite.com/hello-world
  • La versión en español de la publicación está en yoursite.com/es/hola-mundo
  • La versión alemana de la publicación está en yoursite.com/de/hallo-welt

En conjunto, estas tres páginas se conocerían como un clúster de hreflang porque las tres están vinculadas entre sí mediante etiquetas hreflang comunes.

No solo esto ayuda a Google a ofrecer el idioma correcto a cada usuario, sino que también le indica a Google que las tres publicaciones cubren el mismo contenido, aunque estén en diferentes idiomas.

También puedes usar etiquetas hreflang para comunicar información sobre ciertas locales además de idiomas. Por ejemplo:

  • yoursite.com/hello-world ¿Es la versión en inglés para lectores de EE. UU.?
  • yoursite.co.uk/hola-mundo ¿Es la versión en inglés para lectores del Reino Unido?

Añadir las etiquetas hreflang adecuadas es importante por varias razones diferentes:

  • Evitar problemas de contenido duplicado – Las etiquetas hreflang ayudan a Google a comprender que estos fragmentos de contenido enlazados no son duplicados, sino que están dirigidos a diferentes idiomas y/o regiones.
  • Optimizar páginas para diferentes audiencias – Las etiquetas hreflang ayudan a garantizar que Google clasifique la versión correcta de la página para cada buscador.
  • Benefíciate de las señales de clasificación compartidas – Google ha insinuado que las páginas vinculadas entre sí en un grupo de hreflang pueden beneficiarse de señales de clasificación de SEO compartidas.

Si quieres aprender aún más sobre las etiquetas hreflang, puedes consulta nuestra guía definitiva sobre las etiquetas hreflang.

¿Necesitas etiquetas hreflang si tu sitio solo tiene un idioma?

Si tienes un sitio web multilingüe, necesitas absolutamente añadir etiquetas hreflang. No hay debate sobre eso.

¿Pero necesitas etiquetas hreflang si solo ofreces un único idioma en tu sitio web?

Bueno, la respuesta es que depende.

Incluso si solo ofreces un solo idioma, es posible que quieras utilizar etiquetas hreflang si tienes diferentes versiones de tu sitio que se dirigen a distintas regiones. Por ejemplo, si tienes una versión para EE. UU., una para el Reino Unido y otra para Australia, debes agregar etiquetas hreflang aunque las tres versiones estén en inglés.

The hreflang tag will help Google make sure that it serves the Australian version of your site to people searching from Australia and the USA version to people searching from the USA.

If you only have a single version of your site in a single language, there’s not really much need to use hreflang tags, though a small number of SEOs do still recommend it.

¿Qué significa el mensaje “Tu sitio no tiene etiquetas hreflang” en Google Search Console?

Your site has no hreflang tags error in Google Search Console

The “Your site has no hreflang tags” message appears in the International Targeting tool of Google Search Console, which is still available as a legacy tool.

The message means exactly what it sounds like – Google has been unable to detect any hreflang tags on your site, which means that it won’t be able to properly index and connect the different language/locale versions of your pages.

This could be because you just plain haven’t added any hreflang tags or it could be because you’ve tried to add tags but done so incorrectly.

Either way, it’s important to fix this problem if you offer your site in multiple languages because it can have a negative effect on your site’s SEO and user experience.

The “fix” will be either adding hreflang tags (if you haven’t done so already) or troubleshooting why Google isn’t properly detecting your hreflang tags (if you’ve tried to add them already).

Once you fix the problem, this error message should disappear in Google Search Console and be replaced by a report that shows you how Google has interpreted your site’s hreflang tag structure.

Cómo configurar manualmente las etiquetas hreflang

If you’re using WordPress, we’ll show you a mucho easier way to fix the “Your site has no hreflang tags” problem in the next section by using el complemento gratuito TranslatePress.

However, if you’re no using WordPress, you might need to manually set up hreflang tags…which can be a bit of a bear.

You can and should add hreflang tags in two locations:

  1. The <head> section of each page’s code.
  2. Your site’s XML sitemap.

The key thing to understand with hreflang tags is that the hreflang cluster must always include every single instance of the page including the current page.

For example, if you have an English and Spanish version of the page, each page would include the hreflang tags for ambos the English and Spanish versions. Yes – the English-language page still includes the hreflang tag for the English version, even though that’s the page a visitor is already on.

Including all instances of a page in every hreflang cluster is important so that Google can fully understand how things connect. If you don’t do it, that can trigger the error.

Read below for the code format that you need to follow to fix the “Your site has no hreflang tags” error.

Again, if you feel overwhelmed by trying to add this code yourself, keep reading for a much easier plugin solution for WordPress users.

Code Format for Hreflang Tags in <head>

<link rel="alternate" hreflang="en" href="https://yoursite.com/hello-world/" />
<link rel="alternate" hreflang="es-mx" href="https://yoursite.com/es/hola-mundo/" />
<link rel="alternate" hreflang="de" href="https://yoursite.com/de/hallo-welt/" />

Code Format for Hreflang Tags in XML Sitemap

<url>
https://yoursite.com/hello-world/
<xhtml:link rel="alternate" "hreflang="es-mx" href="https://yoursite.com/es/hola-mundo/"/>
<xhtml:link rel="alternate" "hreflang="de" href="https://yoursite.com/de/hallo-welt/"/>
</url>

Cómo solucionar “Tu sitio no tiene etiquetas Hreflang” en WordPress

If you’ve built your website with WordPress, el complemento TranslatePress offers an easy way to not just translate your content into one or more new languages, but also automatically ensure that every single page has the proper hreflang tags.

For WordPress users, this is usually the easiest way to fix the “Your site has no hreflang tags” problem. Rather than needing to manually add the tags (and keep them updated when you change things), you can just let TranslatePress do all of the work for you without lifting a finger.

To give you full coverage, TranslatePress will add hreflang tags to both the <head> section of each page, as well as to your WordPress site’s XML sitemap (including compatibility for most popular SEO plugins).

It will also let you manage all of your site’s translations using a visual editor, which gives you a more convenient way to work with multilingual content.

Below, you’ll find a quick guide on how to use TranslatePress to fix the “Your site has no hreflang tags” problem. If you want a more detailed look at creating a multilingual site with TranslatePress, you can also check out nuestro tutorial completo sobre WordPress multilingüe.

TranslatePress Multilingüe

The easiest way to fix the your site has no hreflang tags error on WordPress.

1. Instala TranslatePress y selecciona los idiomas

To get started, install and activate the free TranslatePress plugin on your site. It’s listed at WordPress.org, so you can install it like any other free plugin.

Luego, ve a Configuración → TranslatePress to choose the languages that you want to use on your site (and therefore the languages for which you want to add hreflang tags):

  • Idioma predeterminado – the original language of your site in which you wrote your original content.
  • Todos los idiomas – one or more new languages that you want to add to your site.

Here’s what it looks like to add hreflang tags for both English and Spanish:

Choose languages to fix your site has no hreflang tags error

Note that you’re able to choose ambos the language and the locale. You could even choose the same language twice, but in different locales.

The free version of TranslatePress lets you add one new language to your site (for two languages total). If you want to use more than that, you can actualizar a la Personal licencia to add support for idiomas ilimitados.

2. Traduce tu contenido

Next, you’ll want to use TranslatePress to translate your content, which is how you’ll create the different versions of your pages to include in hreflang tags.

When you use TranslatePress to translate a piece of content, TranslatePress will create a static, SEO-indexable page for each language version and include that page in the hreflang cluster.

You can translate your entire site or you can only translate certain important pieces of content.

If you want to save time, TranslatePress also supports automatic machine translation using either Google Translate or DeepL. Even if you use machine translation, you’ll still be able to edit all of the translations from the TranslatePress editor.

If you want to use automatic translation, you can set that up from the Traducción automática tab of the TranslatePress settings area. You can follow nuestra guía sobre cómo traducir automáticamente WordPress for detailed instructions.

Alternatively, you can also just translate your content from scratch.

Either way, here’s how to launch the TranslatePress editor:

  1. Open the page that you want to translate on the frontend of your site.
  2. Haz clic en el nuevo Traducir página opción en la barra de herramientas de WordPress.
Open the translation editor

You should see a visual preview of the page on the right and a sidebar on the left.

To edit the translation for any content, all you do is hover over it and click the pencil icon. That will open the translation in the sidebar where you can add/edit translations as needed.

Traduce tu contenido

You can use this same point-and-click approach to translate 100% of your content, whether it comes from the WordPress editor, your theme, another plugin, and so on. If you want a more detailed look at anything, we have a bunch of guides on translating various types of content:

3. Test/Verify Your Hreflang Tags

At this point, you should have proper hreflang tags in the <head> section of every page on your site.

You can verify this by looking at the code directly or using a tool like the hreflang.org testing tool.

While there are other tools with nicer interfaces, the reason we like this tool is that it lets you quickly check your entire site (by entering a sitemap) instead of needing to manually add each URL (though you can also test individual URLs).

Here, you can see that our test site got the “all ok” after setting up TranslatePress:

Test your site for the your site has no hreflang tags error

If you want to also add hreflang tags to your WordPress site’s XML sitemap, you can purchase the TranslatePress Personal license to access the SEO Pack add-on.

The SEO Pack add-on not only helps you create a multilingual sitemap with the proper hreflang tags, but it also gives you lots of other features to improve multilingual SEO such as the ability to translate SEO titles/descriptions, image alt text, and more.

4. Finish Setting Up Key Multilingual Functionality

At this point, you’re totally finished from the perspective of fixing the “Your site has no hreflang tags” error. Google should now be able to detect your site’s hreflang tags and show you them in Search Console (though it will take some time for the data to update).

However, you might want to perform a few other steps to create a better experience for your human visitors, such as adjusting your frontend language switcher. To learn how to do that, check out our full WordPress language guide.

Soluciona el error “Tu sitio no tiene etiquetas Hreflang” para siempre

If you offer multiple versions of your site for different languages and/or locales, it’s important to add hreflang tags so that Google and other search engines can understand how those pages connect.

If you’re seeing the “Your site has no hreflang tags” error in Google Search Console, that means Google hasn’t been able to detect hreflang tags on your site, which is a problem if your site is targeting multiple languages/locales.

To fix the problem, you need to add properly formatted hreflang tags to your site’s <head> section (and ideally your XML sitemap).

While you can do this manually, el complemento TranslatePress offers a much simpler and fully automated solution for adding hreflang tags on WordPress.

You won’t need to lift a finger when it comes to hreflang tags – just choose your languages, translate your content, and let TranslatePress ensure that every page has the proper hreflang tags.

If you’re ready to get started, you can follow the tutorial above or read our complete guide to creating a multilingual WordPress site.

TranslatePress Multilingüe

The easiest way to fix the your site has no hreflang tags error on WordPress.

Do you still have any questions about how to fix the “Your site has no hreflang tags” error? Let us know in the comments!

Si encontraste útil esta publicación, por favor visita nuestro Canal de YouTube, donde subimos constantemente tutoriales en video cortos y fáciles de seguir. También puedes seguirnos en Facebook y Twitter ser el primero en enterarte cada vez que publicamos.