Hreflang link is always going to the homepage
-
Hey there fellow Mozzers,
I'm currently performing some work for a webshop which is located at two different TLD's.
example.com and example.nl.In the head of both websites the hreflang tags have been added to tell Search Engines which site is targeted at which country. That's good
However, the hreflang links are pointing to the homepages of both websites from every page on the websites. Isn't example.nl/blog/ not supposed to link the hreflang tag to example.com/blog/?
-
Hi Tom,
The php server request uri way would be a good option except that the URLs are different on the different domains.
For example:
Therefor i really need a way to define the correct url on a page by page basis. Manually doing this in Wordpress is going to be a pain.
-
Hi,
You are correct in thinking the hreflang tag should be different on each page, pointing to the different versions of that page, not the homepage.
Unless you feel like manually coding each page you could use php and $_SERVER['REQUEST_URI'] or js and window.location.pathname to get the current page path and append that to your domain in the hreflang tag in your head?
Or if that seems like a lot of work you can specify your alternate URLs for each language through a sitemap like this:
<loc>http://www.example.com/></loc>
<xhtml:link rel="alternate" hreflang="en" href="<a href=" http:="" www.example.com="" "="">http://www.example.com/" /></xhtml:link>
<xhtml:link rel="alternate" hreflang="x-default" href="<a href=" http:="" www.example.com="" "="">http://www.example.com/" /></xhtml:link>
There’s a good post here on the 3 different ways to implement your hreflang tags, per page, in a sitemap and in the http header here: http://www.branded3.com/blogs/implementing-hreflang-tag/
Hope that helps,
Tom
-
I've found this: http://codecanyon.net/item/hreflang-manager/6543147 but note that I haven't used it personally, so I can't comment on how good it is!
-
Thanks for the response! Do you happen to know how to properly handle this in Wordpress? Can't find a good plugin for implementing this.
-
That's how I remember doing it so I hope so This seems to suggest so too: https://support.google.com/webmasters/answer/189077?hl=en
Good luck!
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
What will happen if i manually click on my backlinks placed on other sites using vpn will it increase my linking domain as i am using vpn
will the linking domain of my website increases when i manually click on the backlinks of my website using vpn
International SEO | | calvinkj0 -
Hreflang alternate as single-hop 301 - is this actually a problem?
First, this is not a question about whether 301 redirects pass page rank. My question is that if your hreflang alternative page URL is a 301 redirect*, are there any downsides. In all cases with our situation, the 301 redirect is single-hop and working. Tools, such as SEMRush seem to flag this as a non-canonical hreflang error, but I'm not able to find any cases where Google has suggested a redirecting hreflang is a problem. I'd appreciate any information on this issue before we invest extra time on a large international site. *In Drupal, there are scenarios where it's all but impossible to avoid having a 301 redirect in your hreflang alternate URL without significant custom work.
International SEO | | scottclark0 -
Important pages are being 302 redirected, then 301 redirected to support language versions. Is this affecting negatively the linking juice distribution of our domain?
Hi mozzers, Prior to my arrival, in order to support and better serve the international locations and offering multiple language versions of the same content the company decided to restructure its URLs focused on locale urls. We went from
International SEO | | Ty1986
https://example.com/subfolder to https://example.com/us/en-us/new-subfolder (US)
https://example.com/ca/en-us/new-subfolder (CAN)
https://example.com/ca/fr-ca/new-subfolder (CAN)
https://example.com/de/en-us/new-subfolder (Ger)
https://example.com/de/de-de/new-subfolder (Ger) This had implications on redirecting old URLs to new ones. All important URLs such as https://example.com/subfolder were
302 redirected to https://example.com/us/en-us/subfolder and then 301 redirected to the final URL. According to the devs: If you change the translation to the page or locale, then a 302 needs to happen so you see the same version of the page in German or French, then a 301 redirect happens from the legacy URL to the new version. If the 302 redirect was skipped, then you would only be able to one version/language of that page.
For instance:
http://example.com/subfolder/state/city --> 301 redirect to {LEGACY URL]
https://example.com/subfolder/state/city --> 302 redirect to
https://example.com/en-us/subfolder/state/city --> 301 redirect to
https://example.com/us/en-us/new-subfolder/city-state [NEW URL] I am wondering if these 302s are hurting our link juice distribution or that is completely fine since they all end up as a 301 redirect? Thanks.1 -
Hreflang tags and canonical tags - might be causing indexing and duplicate content issues
Hi, Let's say I have a site located at https://www.example.com, and also have subdirectories setup for different languages. For example: https://www.example.com/es_ES/ https://www.example.com/fr_FR/ https://www.example.com/it_IT/ My Spanish version currently has the following hreflang tags and canonical tag implemented: My robots.txt file is blocking all of my language subdirectories. For example: User-agent:* Disallow: /es_ES/ Disallow: /fr_FR/ Disallow: /it_IT/ This setup doesn't seem right. I don't think I should be blocking the language-specific subdirectories via robots.txt What are your thoughts? Does my hreflang tag and canonical tag implementation look correct to you? Should I be doing this differently? I would greatly appreciate your feedback and/or suggestions.
International SEO | | Avid_Demand0 -
Will hreflang with a language and region allow Google to show the page to all users of that language regardless of region?
I'm launching translations on a website with the first translation being Brazilian Portuguese. If I use the following hreflang: If a user is outside of Brazil and has their browser language set to just Portuguese (Not Portuguese (Brazil)) will Google still serve them the Portuguese version of my pages in search results?
International SEO | | Brando160 -
URL Structure - Homepage, Country and State Pages
Hello, I am creating a website (or websites if best format) that will have state-specific boating license courses for every state in the US, Canada and Australia. I would like the content to be available on the website in English, French and Spanish. I want to be the global leader in providing boat test courses. For the (1) homepage, (2) country pages, and (3) state pages, what is best SEO format I should use for:
International SEO | | Monologix
(a) URL structure
(b) "href lang" code
(c) rel canonical code
(d) will meta content with non-English pages need to also be in the non-English language of that page? Also, what server company do you recommend I host my website with? I am a non-programmer and learning SEO, so any and all help will be greatly appreciated! Thank you very much in advance!!!0 -
Will website with tag hreflang pass link juice to other country/language version of website?
For example, I have a website XXX.com and I made hreflang tags to other country/language versions of website: ru.XXX.com (for Russia/Russian) XXX.com.ua (for Ukraine/Russian) ua.XXX.com (for Ukraine/Ukraine) Then I will acquire links to XXX.com. The question is: will XXX.com pass link juice to websites ru.XXX.com, XXX.com.ua and ua.XXX.com. Will these websites rank in their countries if I will acquire links ONLY to XXX.com? I looked at https://support.google.com/webmasters/answer/189077?hl=en, but haven't found what google think about that. Thank you in advance. I will appreciate your help.
International SEO | | Kabanchik0 -
Recent Google Link Scheme Updated ? What's Your Reaction against Link Building, Link Exchanging ?
Many Bloggers and Webmasters are upset over this !
International SEO | | Esaky
Recent Google Link Scheme Updated ? What's Your Reaction against Link Building, Link Exchanging ? https://support.google.com/webmasters/answer/66356?hl=en What will you Do, if we are good at traffic to our blog and advertiser link will be no-follow - will they accept it ! and guest post also. They need a do-follow link back to their blog or website they hired for !0