Hreflang Implementation
-
Hello All,
I'm currently working on a website with different folders for different country. For now I have defined the href lang implementation as below:
http://www.homepage.com/en/default.html"/>
Language: English - Country: United Kingdomhttp://www.homepage.com/enus/default.html"/>
Language: English - Country: United Stateshttp://www.homepage.com/nl/default.html"/>
Language: Dutch - Country: Netherlandshttp://www.homepage.com/nlbe/default.html"/>
Language: Dutch - Country: Belgiumhttp://www.homepage.com/fr/default.html"/>
Language: French - Country: All french speaking countrieshttp://www.homepage.com/de/default.html"/>
Language: German - Country: All german speaking countrieshttp://www.homepage.com/es/camisa-a-medida.html"/>
Language: Spanish - Country: Spainhttp://www.homepage.com/enen/default.html" />
Language: English - Country: All other countriesDoes this make any sense?
Furthermore, how do I implement this on underlying pages. Do I fill out the URL dynamically according to the URL the tags are found on? Or do I use these tags mentioning the homepage on all underlying pages? If so, how do I avoid duplicate content issues between NL and NL-BE and EN-GB, EN-US and EN? Canonicals?
Besides the whole hreflang implementation I was wondering if it's worthwhile or advisable to implement lang="en" xml:lang="en_"_ in the HTML tag and http-equiv="content-language" content="en_"_ in the META tags?
-
Hi Bulserik
regarding those two questions, if we look just at Google, they are not taken into consideration by Google for International SEO.
On the other:
- because they don't harm a site;
- because they are used by Bing for geolocalization and geotargeting (Bing does not use the hreflang)
then, it is a good idea using them.
Check this old but still valid post on Bing about how to geotarget for them: http://blogs.bing.com/webmaster/2011/03/01/how-to-tell-bing-your-websites-country-and-language/
Finally, just to be sure:
remember to create Google Webmaster Tools profile for each subfolder and geotarget them for their corresponding countries.
-
No one able to help me out on this one?
-
Great, thanks. I'm afraid I'm on ISS though so have to see how to get that working. I understand from your answer the correct way of doing this is by implementing a dynamic URL in the hreflang tag and not just the homepage.
Besides the technical implementation you explained above, I'm assuming the way I segmented the site is okay right?
After that I still have this part unsolved: Besides the whole hreflang implementation I was wondering if it's worthwhile or advisable to implement lang="en"xml:lang="en" in the HTML tag and http-equiv="content-language" content="en" in the META tags?
-
Assuming you're on an Apache server, this works for internal pages:
" hreflang="x-default" />
" hreflang="en-au" />
" hreflang="en-ca" />The REQUEST_URI will pull the internal page you're on (so if you're /about, then it will add /about to all 3 hreflang tags. I don't know if (but I think) this won't work on IIS servers. Just a thought if it doesn't seem to work.
Assuming your folder structure stays the same, you should be all set.
And once you're done, test it using Flang.
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
-
Google Search Console and User-declared canonical is actually Hreflang tag
Hey, We recently launched a US version of UK based ecommerce website on the us.example.com subdomain. Both websites are on Shopify so canonical tags are handled automatically and we have implemented Hreflang tags across both websites. Suddenly our rankings in the UK have dropped and after looking in search console for the UK site ive found that a lot of pages are now no longer indexed in Google because the User-declared canonical is the Hreflang tag for the US URL. Below is an example https://www.example.com/products/pac-man-arcade-cabinet - is the product page is the canonical tag rel="alternate" href="https://www.example.com/products/pac-man-arcade-cabinet" hreflang="en-gb" /> - UK hreflang tag rel="alternate" href="https://us.example.com/products/pac-man-arcade-cabinet" hreflang="en-us" /> - US Hreflang tag then in Google search console the user-defined canonical is https://us.example.com/products/pac-man-arcade-cabinet but it should be https://www.example.com/products/pac-man-arcade-cabinet The UK website has been assigned to target the United Kingdom in Search Console and the US website has been assigned to target the United States. We also do not have access to robots.txt file unfortunately. Any help or insight would be greatly appreciated.
Technical SEO | | PeterRubber0 -
Hreflang and canonical
Hi all, I'm hoping someone can help me solve this once and for all! I keep getting hreflang errors on our site crawls and I cannot understand why. Does anything here look off to you? Thank you! JGdWcqu
Technical SEO | | eGInnovations1 -
Hreflang in country specific XML Sitemaps?
Hello! I'm rolling out hreflang tags in my client's "main" XML Sitemap. My question is: do we need to implement these tags in the country level XML Sitemaps also? Thanks!
Technical SEO | | SimpleSearch1 -
HREFLANG No Return Tag Error
Keep getting WMT no return tag error. Also got an email today on this issue. Here are a couple pages showing up in the error report: Originating URL: /hawaii/kauai-real-estate/ Alternate URL: /jp/hawaii/kauai-real-estate/ Here are the hreflang tags for each page: /hawaii/kauai-real-estate/ /jp/hawaii/kauai-real-estate/ The only thing I can see is the hreflang= is at the end of the snippet but doesn't seem like that would matter. Any thoughts would be greatly appreciated. Thank you.
Technical SEO | | SoulSurfer80 -
Hreflang tags with link to redirect loop
Hi guys, I'm having a bit of an issue on a client site that I'm hoping someone can help me with. Basically, the client has two domains, one serving users in the Republic of Ireland (http://www.americanholidays.com), showing Euro prices, and the other serving users in Northern Ireland (http://www.americanholidays.com/gb_en/) showing £ prices. The issue I'm having is that the URL for the Northern Ireland page has a 302 on it and goes through another 2/3 301 redirects until it resolves as http://www.americanholidays.com, however it does then show the £ prices. You can see the redirect chain here: http://tools.seobook.com/server-header-checker/?page=single&url=http%3A%2F%2Fwww.americanholidays.com%2Fgb_en%2F&useragent=1&typeProtocol=11 The homepage is using the Hreflang tag, and pointing search engines to serve the http://www.americanholidays.com/gb_en/ page to users using EN-GB as their language. The page is also using a self-referencing canonical, which I believe may negate the whole Hreflang tag anyway? My main question is - is the fact that the Hreflang for the gb_en page is pointing to a chain of redirects negatively affecting it? (I understand too many redirects are never good). Also, is the canonical negating the Hreflang? Any help/info would be great as I just can't get my head around it! Thanks guys Daniel
Technical SEO | | DanielKiely60 -
How to implement schema.org for different hotel rooms types
I'm working on a resort that has different type of rooms available. Does anyone know how to use schema.org to set it a hotel with different hotel room types. I looked at the hotel schema but I did not see any room types. Thanks!
Technical SEO | | ppapola0 -
Implementing Cannonical & Alternate tags on a large website
Hi There, Our brochureware website consists of a Desktop site (www.oursite.com)and a Mobile website (m.oursite.com). I know I need to implement the alternate tags on the desktop pages and the cannonical tags on the mobile versions. However we have a huge site is there any dynamic way through javascript to have the code be generated or is it something that should be done manually page by page? Below is sample javascript a colleague completed to attempt to dynamically develop the snippet but I am unsure if bots will be able to interpret it: Alternate version: Thanks in advance Phil
Technical SEO | | Phily0 -
Did I implement the Canonical Correctly?
Hello, I am trying for the first time to implement a canonical redirect on a page and would really appreciate it if someone could tell me if this was done correctly. I am trying to do a canonical redirect: -from http://www.diamondtours.com/default.aspx -to http://www.diamondtours.com/ As you will see in the source code of the default.aspx page, the line of code written is: <link rel="canonical" href="http://www.diamondtours.com" /> Is this correct? Any guidance is greatly appreciated. Jeffrey Ferraro
Technical SEO | | JeffFerraro0