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
-
Correct Hreflang & Canonical Tags for Multi-Regional Website English Language Only having URL Parameters
Dear friends, We have a multi-regional website in English language only having the country selector on the top of each page and it adds countrycode parameters on each url. Website is built in Magento 1.8 and having 1 store with multiple store views. There is no default store set in Magento as I discussed with developer. Content is same for all the countries and only currency is changed. In navigation there are urls without url parameters but when we change store from any page it add parameters in the url for same page hence there are total 7 URLs. 6 URLs for each page (with country parameters) and 1 master url (without parameters) and making content duplicity. We have implemented hreflang tags on each page with url parameters but for canonical we have implemented master page url as per navigation without url parameters Example on this page. I think this is correct for master page but we should use URL parameters in canonical tags for each counry url too and there should be only 1 canonical tag on each country page url. Currently all the country urls are having master page canoncial tag as per the example. Please correct me if I am wrong and **in this case what has to be done for master page? **as google is indexing the pages without parameters too. We are also using GEOIP redirection for each store with country IP detection and for rest of the countries which are not listed on the website we are redirecting to USA store. Earlier it was 301 but we changed it to 302. Hreflang tags are showing errors in SEMRush due to redirection but in GWT it's OK for some pages it's showing no return tags only. Should I use **x-default tags for hreflang and country selector only on home page like this or should I remove the redirection? **However some of the website like this using redirection but header check tool doesn't show the redirection for this and for our website it shows 302 redirection. Sorry for the long post but looking for your support, please.
International SEO | | spjain810 -
For My International Sites only Homepage in other Language rest Pages are in English. Hreflang required here?
Hello All, For my ecommerce site at my homepage there is an Language option of 9 different countries. My main site - abcd.co.uk and other sites are like this se.abcd.co.uk, fr.abcd.co.uk, es.abcd.co.uk etc From my main site if user clicks on fr.abcd.co.uk then France site will open but when he click on any link it will redirect to my UK site. On France site homepage if user hover the cursor then links are visible of UK site only. My query is ;- Do it required here to implement hreflang? As only homepage is in different language? Do it anything wrong in google point of view? Thanks!
International SEO | | wright3350 -
Hreflang tag on every page?
Hello Moz Community, I'm working with a client who has translated their top 50 landing pages into Spanish. It's a large website and we don't have the resources to properly translate all pages at once, so we started with the top 50. We've already translated the content, title tags, URLs, etc. and the content will live in it's own /es-us/ directory. The client's website is set up in a way that all content follows a URL structure such as: https://www.example.com/en-us/. For Page A, it will live in English at: https://www.example.com/en-us/page-a For Page A, it will live in Spanish at https://www.example.com/es-us/page-a ("page-a" may vary since that part of the URL is translated) From my research in the Moz forums and Webmaster Support Console, I've written the following hreflang tags: /> For Page B, it will follow the same structure as Page A, and I wrote the corresponding hreflang tags the same way. My question is, do both of these tags need to be on both the Spanish and English version of the page? Or, would I put the "en-us" hreflang tag on the Spanish page and the "es-us" hreflang tag on the English page? I'm thinking that both hreflang tags should be on both the Spanish and English pages, but would love some clarification/confirmation from someone that has implemented this successfully before.
International SEO | | DigitalThirdCoast0 -
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 -
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 -
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 -
Alexa Rank and Linking from Article sites.
We are creating unique content and submitting our articles to article sites. I have some questions about the best way to go about this. 1. We are being very careful to create unique content for each submission - so we are not submitting the same article to multiple sites. Each submission is unique, so 1 article per 1 article directory. 2. When I did my research about these article sites at Alexa.com, I noticed that a lot of the article sites are ranking very well globally, but that a lot of them are #1 in Alexa for India. They are still ranked for other countries with very top ranking, for example, they may 9,000 Alexa rank in India and then 18,000 in the U.S. which is still very high. 3. We are trying to reach U.S. customers mostly, so I am wondering if we are still getting value by linking to these sites who have global reach (even though they are ranked best for India). I would think that this is very beneficial still, but I didn't want to get the wrong kind of traffic by getting links from sites that are primarily getting their traffic from India, even though they are also getting tons of traffic from the U.S. - I am assuming this is OK because a 18,000 or 19,000 Alexa Rank in the U.S. is still excellent and I will benefit by this. But I wanted to be sure. Feedback?
International SEO | | applesofgold0