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!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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
-
Targeting/Optimising for US English in addition to British English (hreflang tags)
Hi, I wonder if anyone can help? We have an e-commerce website based in the UK. We sell to customers worldwide. After the UK, the US is our second biggest market. We are English language only (written in British English), we do not have any geo-targeted language versions of our website. However, we are successful in selling to customers around the world on a regular basis. We have developers working on a new site due to launch in Winter 2021. This will include a properly managed site migration from our .net to a .com domain and associated redirects etc. Management are keen to increase sales / conversions to the US before the new site launches. They have requested that we create a US optimised version of the site. Maintaining broadly the same content, but dynamically replacing keywords: Example (clothing is not really what we sell): Replacing references to “trainers” with “sneakers”
International SEO | | IronBeetle
Replacing references ‘jumpers with “sweaters”
Replacing UK phone number with a US phone number It seems the wrong time to implement a major overhaul of URL structure, considering the planned migration from .net to .com in the not too distant future. For example I’m not keen to move British English content on to https://www.example.com/en-gb Would this be a viable solution: 1. hreflang non-us visitors directed to the existing URL structure (including en-gb customers): https://www.example.com/
2. hreflang US Language version of the site: https://www.example.com/en-us/ As the UK is our biggest market It is really important that we don’t negatively affect sales. We have extremely good visibility in SERPS for a wide range of high value/well converting keywords. In terms of hreflang tags would something like this work? Do we need need to make reference to en-gb being on https://www.example.com/ ? This seems a bit of a ‘half-way-house’. I recognise that there are also issues around the URL structure, which is optimised for British English/international English keywords rather than US English e.g. https://www.example.com/clothing/trainers Vs. https://example.com/clothing/sneakers Any advice / insight / guidance would be welcome. Thanks.0 -
Does not having any hreflang tags for U.S Visitors lead to an increase in International Visitors?
I have seen a massive increase in International Visitors on our website and visitors within the United States dropped off hard this month (by about 20%). Could it be possible that not having any hreflang tags can lead to an increase in International Customers visiting the site even though your sitemap is set to "Target users in United States" within the Google Search Console? In the Google Search Console, I have International Targeting set to "Target users in United States." However, Google Search Console is saying our site doesn't have any hreflang tags. In the Google Search Console, it says "Your site has no hreflang tags. Google uses hreflang tags to match the user's language preference to the right variation of your pages." I'm not sure when that was flagged, but recently we have seen a massive increase in International Visitors to our site from countries such as Russia, Vietnam, Indonesia, the United Kingdom and so on. This poses a problem since our chances of turning one of those visitors into a customer is extremely slim. Along with that, nearly every international customer is contributing to an extremely high Bounce Rate. Attached is a screenshot of the Error about hreflang tags. https://imgur.com/a/XZI45Pw And here is a screenshot of the Country we are targeting. https://imgur.com/a/ArpWe9Z Lastly, attached is a screenshot of all of the Countries that visited our site today: https://imgur.com/a/d0tNwkI
International SEO | | MichaelAtMSP1 -
When should hreflang be deployed in this situation; now or later ?
Hi I have a question in regard to point 1 in Gianluca Fiorelli first comment on Aleyda Solis old but great international targeting article in regard to hreflang: https://mza.seotoolninja.com/blog/using-the-correct-hreflang-tag-a-new-generator-tool it would obvs be amazing if either Gianlucca or Aleyda can answer but if anyone else feels they can do so confidently then that would be great too 🙂 I'm advising someone in similar situation as that (their main brand is USA based on a .com showing up in UK searches too) and they have launched .co.uk sites (without any seo) to target UK brand searches, so obviously the .com is still dominating UK serps for brand, and the .co.uk is ranking on page 4 on average for a brand search. **BUT **before I tell them to roll out hreflang shouldn't they build up some authority etc first for their new country specific (.co.uk) site ? since they are very new and have no authority or even basic SEO and don't rank higher than page 4 for brand searches (the .com is in no1 in both usa and uk). I know hreflang needs to be used correctly here but im not sure when it should be, now or later (after authority has built up for the new uk focused sites) ? In other words I take it deploying the hreflang correctly wont simply cause these home pages to swap positions for brand search in uk (or will it) ? Im worried deploying it immediately could actually destroy the brands current page 1 serps for brand term (since will remove the .com page from the uk serp). Hence i take it its best to build up the new .co.uk sites seo/authority etc first and at least get that sites brand ranking moving up the listings before deploying hreflang on the .com, to then hopefully remove the .com listing in place of the .co.uk for brand ? OR does Gianlucca point in his comment suggest that correct hreflang usage on both sites should swap the high authority .com no1 position with the low authority .co.uk for a brand search ? Many Thanks Dan
International SEO | | Dan-Lawrence0 -
Hreflang missing
Hi everybody, I cannot find the hreflang in the source code neither in the sitemaps but Google search console is showing me the tag. Did anyone have this problem? Or does anyone know how to check it? I scanned the site and no tool detected the hreflang in it. Thank you.
International SEO | | poliedric0 -
Different urls for the homepage on an international website
Hi! I was wondering what would be the best strategy to solve duplicated content generated by the homepage and its differents URLS This is an international website. Now it only has one language working: Spanish, but the url structure is already ready to work with the language approach So we have now www.brand.com -> Spanish Homepage (canonical www.brand.com/es)
International SEO | | teconsite
www.brand.com/es -> Spanish Homepage (canonical www.brand.com/es)
www.brand.com/index.php -> Spanish Homepage (canonical www.brand.com/es) I would like to know if this is the correct approach of if we should add 301 redirects instead of canonical. Let's image that they want to active the /en language, so they will have www.brand.com
www.brand.com/index.php
www.brand.com/es
www.brand.com/en now what? I image they have to use hreflang, but I am a little lost with how this should work. 301? canonical? hreflang? Could you help me? Thank you! Victoria0 -
High domain authority for shady link directories
Hi there, First of, I'm new to the moz community and I love it already! So much to learn and to do for getting better and better at SEO. Really helpful! Okay, my question. If I analyze (top 5) sites with the open site explorer some of them have a link profile consisting just of link directories. How come they rank so high with just link directories backing them up? The directories often are just ongoing lists of links without any form of content. But the authorities of the directories (page and domain) are often between 40-60 or even above! How come they get such high authority? And do I have to use them for my linking profile or will it hurt me? On moz I learned not to use those directories because it's quality > quantity these days. But it almost seems as if this is not true because only half of the top positions in my keyword-market actually make use of more then just link directories. I must say that I operate in the Dutch markets so maybe different rules apply in the Netherlands? Thanks in advance and kind regards, Luuk van Dongen
International SEO | | VanDongenOnline1 -
Links metrics & rel="alternate" hreflang="x"
Bonjour! If with rel="alternate" hreflang="x" we can indicate to Google that an URL have translated equivalents of a page, are the links metrics splited between all pages or Google considers all the pages as only one? Thanks! Maxime
International SEO | | Maxoulala0 -
Does 301 redirect on homepage impact seo strongness of this page
Hi, we are running a multilingual website with this structure : http://www.website.com/en
International SEO | | Samuraiz
http://www.website.com/fr
http://www.website.com/de
http://www.website.com/lang (etc.) with then all onsite URLs this way:
http://www.website.com/en/hello
http://www.website.com/fr/bonjour
http://www.website.com/it/ciao We have a 301 redirect on http://www.website.com going to http://www.website.com/en - except if a user already went on the website and chose a specific language. My question is : Do you think the english homepage will have more seo power if it goes directly to http://www.website.com/ I wonder if we lose some linkjuice with the 301 redirection, as many backlink goes directly to http://www.website.com1