Questions tagged [hreflang]

The hreflang attribute specifies the language of an HTML document.

Many websites serve users from around the world with content translated or targeted to users in a certain region. Google uses the rel="alternate" hreflang="x" attributes to serve the correct language or regional URL in Search results.

80 questions
5
votes
0 answers

Sitemap.xml with for multilanguage does not render properly on browser?

Generating a Sitemap with multiple languages: Following Google instructions from: https://support.google.com/webmasters/answer/189077?hl=en THIS CODE:
cbdeveloper
  • 27,898
  • 37
  • 155
  • 336
4
votes
1 answer

hreflang with multi regional & multilingual sites

I'm attempting to explore the correct usage of the hreflang tag based on documentation provided by Google but I have some questions in the case where a website has multiple regional sites with different content and localized pages. For example the…
James Ives
  • 3,177
  • 3
  • 30
  • 63
4
votes
1 answer

Semantic use of hreflang and lang attribute

This is not a SEO question. I am curious how to markup HTML in a semantic correct way concerning the used language. Please correct me if my markup is mistaken. My questions is: do I need the lang attribute in the html tag when I already use the…
iep
  • 601
  • 1
  • 8
  • 23
4
votes
3 answers

hreflang tags for Europe

I'd always understood that, because there is no en-EU IETF tag, to target Europe I'd have to either use en or list out an hreflang for each country within Europe. Looking at the source of Think With Google, I noticed the following:
Adam Hopkinson
  • 28,281
  • 7
  • 65
  • 99
3
votes
0 answers

Webmastertools: site has no hreflang tags after implemented hreflang tag

I have an issue with my website. I have implemented below language tags on my website and I am targeting the website in Indonesian and English language for users on Indonesia, Malaysia, and Australia zahiraccounting.com/ is Default page, redirects…
amzarfa
  • 31
  • 4
2
votes
0 answers

Mismatched hreflang and HTML lang declarations and cannonicals

there is a redirect I tried to do on my site, but I am quite confused in it. First of all, I have SSL installed on the site and I use non-www domain redirect. In the .htaccess file below 301 redirect to https://. If I need to summarize the…
2
votes
1 answer

How to generate a Google Sitemap with localized versions of a page using PHP and DOMDocument

I want to generate a Google Sitemap using PHP for a multilanguage website. How can i do that the right way, without printing XML strings? Perhaps using the PHP DOMDocument class? The structure must be like the one Google recommends:…
Valeriu Ciuca
  • 2,084
  • 11
  • 14
2
votes
1 answer

Why am i getting this error? Return tag error (page does not link back)

I have a website https://www.safetoconvert.com with multi-language support, so, I have used hreflang tag, but I am doing something wrong. it's working with all languages except the English…
2
votes
2 answers

Retrieve page permalink without GET parameters

This multilingual site generates url parameter at the end : example.fr/?lang=en example.fr/?lang=fr I want to precise the hreflang in the header, so I wrote : It…
B4b4j1
  • 430
  • 2
  • 7
  • 24
2
votes
1 answer

Choosing the right hreflang tags

For a customer I need to auto-detect the language based on the browser language. The user should not be redirected to another URL. So my solution was to store the language information in a session cookie. For example: User visits "example.com". His…
rolip
  • 21
  • 2
2
votes
1 answer

When do I need to use x-default for hreflang?

I run a site in Belgium for which default language is Dutch. Using a selector the user can translate the page into English and French. When entering the site for the first time it's served in Dutch: http://example.com/articles/my_article/ The…
bart
  • 14,958
  • 21
  • 75
  • 105
1
vote
1 answer

Hreflang meta tags not seen on my NextJS page

I have a problem because my generated HREFLANG tags are not seen by the SEO checker tools such as https://technicalseo.com/tools/hreflang/. I am generating these in my language switcher component inside the next/head component. I assume the problem…
Primoz Rome
  • 10,379
  • 17
  • 76
  • 108
1
vote
1 answer

How do I make a hreflang tag bidirectional?

Two hreflang tag examples below: I know this will translate an English page to a Spanish page. I then need to make it…
Ryan .10
  • 11
  • 1
1
vote
0 answers

Adding hreflang tags automatically in WordPress multisite

I've managed to write a function that gets the job done, but I feel like there has to be a better way to do this. I have a WordPress multisite network that is running with the subdirectory setup. There's a primary site that is in English and several…
Mike Jandreau
  • 392
  • 3
  • 16
1
vote
1 answer

Hreflang generate Dynamic URL

if someone can help me to get a url dynamically in a twig (base.html.twig) but for the alternative version of the current page link for SEO purposes. The website is using two languages /ar and /fr, when the french version is loaded the website has…
Youshad
  • 11
  • 1
1
2 3 4 5 6