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
-
Providing a default hreflang for translations
I've been doing a lot of research on hreflang and had a question regarding the implementation with location targeting. I have a translation for Brazilian Portuguese, I'd like to target Brazil with this translation on my site but also provide it as the default for other users that speak Portuguese outside of Brazil. Can I use the same translation for two different sites? So my hreflang would look like this: So in this example the pt-br and pt sites would be duplicates but with one being specifically targeted to Brazil and the other for all other people speaking Portuguese anywhere else in the world. The default language of the site is English so the full implementation would look like this:
International SEO | | Brando160 -
Hreflang vs canonical
I'm having an international Drupal website and the hreflang module is in use. However, I'm still not sure how to optimize the pages. Perhaps it's easier to ask with an example **International: **www.example.com/products/product1
International SEO | | Teklan
Here we have the master content of the product **US: **www.example.com/us/products/product1
Here we have exactly the same content as international. Nothing is localized. **UK: **www.example.com/uk/products/product1
Here we have almost the same content as on International. Here and there some local terms and extra text. **German: **www.example.com/de/products/product1
Here we have a translated version of the international page. Questions Do I add hreflang from all to all pages + to itself? Where do I add canonicals? How should I optimize the content on the US and UK pages?0 -
Hreflang no return tags error in GWT
Hello everybody, It has been 2 month since I'm trying to figure out the cause of increasing "no return tags" error count in GWT. I have checked the syntax several times and even switched from meta tags method to including language versions in sitemap without any luck. Below is a screen shot of GWT error and a sitemap excerpt that shows original and alternate URL both having return tags pointing to each other. The full sitemap can be found here: http://wordsru.com/sitemap.xml Any help or insight about whats going on here much appreciated. Thanks! RKP6AhZ.jpg KFluNCC.jpg
International SEO | | Icemax0 -
What is the proper way to setup hreflang tags on my English and Spanish site?
I have a full English website at http://www.example.com and I have a Spanish version of the website at http://spanish.example.com but only about half of the English pages were translated and exist on the Spanish site. Should I just add a sitemap to both sites with hreflang tags that point to the correct version of the page? Is this a proper way to set this up? I was going to repeat this same process for all of the applicable URLs that exist on both versions of the website (English and Spanish). Is it okay to have hreflang="es" or do I need to have a country code attached as well? There are many Spanish speaking countries and I don't know if I need to list them all out. For example hreflang="es-bo" (Bolivia), hreflang="es-cl" (Chile), hreflang="es-co" (Columbia), etc... Sitemap example for English website URL:
International SEO | | peteboyd
<url><loc>http://www.example.com/</loc></url> Sitemap example for Spanish website URL:
<url><loc>http://spanish.example.com/</loc></url> Thanks in advance for your feedback and help!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 -
Linking Between Domains
My company has a main xxx.com website and geo-specific subsites - xxx.co.uk, xxx.es, etc... We link to each of the subsites from the menu, however it also makes sense from a content perspective to link between the sites on internal pages. However, in this video Matt Cutts seems to discourage this - http://searchengineland.com/googles-matt-cutts-linking-20-domains-together-likely-a-cross-linking-scheme-167089 Do you think its worthwhile to keep the inter-site linking to just the menu or okay (or even helpful) to link between the different sites.
International SEO | | theLotter0 -
Multiple hreflang tags
I'm trying to advise on the multi country seo for a site in terms of markup. We've already decided on using sub folders rather than separate sites or subdomains due to an established link profile and good rankings in all countries. The question is in relation to the homepage. Obviously this is the page most likely to rank well in any country (the site is a .com). But can multiple hreflang tags be put on the page to say that the page targets many countries? Or would leaving the hreflang tag off allow it to just rank for all countries? Also do Yahoo and Bing follow hreflang tags? I can't find any info on this anywhere! Thanks very much in advance for any help!
International SEO | | Bdig0 -
Footer Links
Ok I have a plan for the footer links on our site which interlink and point to our international sites, let me run it by you guys and let me know your thoughts. First part is that due to these being sitewide links I am going to nofollow all of them apart from the links in the footer of the home page which ill keep as follow. Second is to use branded terms for these country flags so company name and location instead of being our main keyword... Is there anything else that I should consider here?
International SEO | | EwanFisher0