Using hreflang right - hreflang

When I checked my site with Google Webmaster Tools, I saw a warn about a missing hreflang tag.
I have a one-page website which is multi-language – German and English. When first visited the language will be the same as the browser language. If the user switches the language a cookie is set to store the selected language. But the language is not indicated in the URL (e.g. /en or /de), it’s just mydomain.com in both cases. What I do is changing the lang attribute in the html tag in lang="de" or lang="en". I thought that would be friendly enough for Google.
My question is how to implement the hreflang correctly. All the example I find deal with different language folders like mydomain.com/en/, subdomains en.mydomain.com or extensions mydomain.com/?lang=en.
Should I switch the hreflang tag dynamically via JS depending on the selected language, so when the user sees the English version the hreflang would be de-DE because there’s the same content also in German:
<link rel="alternate" href="http://example.com" hreflang="de-DE" />
And when the user sees the Website in German:
<link rel="alternate" href="http://example.com" hreflang="en-EN" />
But that’s seems odd because the href value would be the same in both cases …

You can only use Hreflang if you have 2 separate URLs. Then Google can send English users to the en page and the German users to the de page.

Related

How change the ISO and Where is hreflang configured into Prestashop 1.7

I have a problem with Prestashop 1.7.5.1 with French Canadian language.
Pretashop has configure the French Canada has "qc" instead of "fr" or "fr_CA" which causing Google Search Console to not identify the proper language for indexing my pages.
My pages are showing in source:
<link rel="alternate" href="https://store.copiscan.com/qc/" hreflang="qc">
<link rel="alternate" href="https://store.copiscan.com/en/" hreflang="en-us">
I need to change it for "fr_CA". I check into Database and not found any value associated to "hreflang" configuration.
Here are my languages installed into Prestashop:
When i try to modify into Language and modify the ISO code, i get an error 500;
I was resolving it by modify directly into the Database under ps_lang table and change it directly there. The store seem's to accept it very well.

Google Cache and multi lingual domain names

I've developed a site which is available via two top level domain names. Both the language on the site is Dutch, one for the Dutch visitors and one for the Belgian visitors.
The .be version of the was recently "launched". Under the hood it's the same site ofcourse and we're using a meta tag to prevent getting penalized for duplicate content. (Google's support page)
So; there's this page: www.domain.nl|be/vakantie/oostenrijk/tirol/
And depending on the TLD this is the implemented meta tag:
// Dutch site visitors
<link rel="alternate" hreflang="nl-NL" href="http://www.bergenmeer.nl/vakantie/oostenrijk/"/>
// Belgium site visitors
<link rel="alternate" hreflang="nl-BE" href="http://www.bergenmeer.be/vakantie/oostenrijk/"/>
The Belgian version is live since about 6 weeks. Both sites are equiped with a sitemap listing the URLs for that domain. But we're seeing the following in Google Cache.
The live version of this page (see URL, phone number on the top right.
The cached version of this page (see URL, phone number on the top right.
When you load this page (despite some performance issues, we're looking into that) and you inspect the network traffic you'll see the page opens with a HTTP 200 response. No redirects whatsoever. Why is Google not showing the Belgian version of the page?
Thanks for the time you take to share your thoughts.
Ben
For .be you could have
<link rel="canonical" href="http://www.bergenmeer.be/vakantie/oostenrijk/"/>
<link rel="alternate" hreflang="nl-NL" href="http://www.bergenmeer.nl/vakantie/oostenrijk/"/>
and for .nl you could have
<link rel="canonical" href="http://www.bergenmeer.nl/vakantie/oostenrijk/"/>
<link rel="alternate" hreflang="nl-BE" href="http://www.bergenmeer.be/vakantie/oostenrijk/"/>
Giving Google a hint at what you want prioritised and therefore to make it into the cache as it appears to only be using the alternate.

how to submit specifically website to Google.fr, Google.de

situation is :
one website (based on Magento ecommerce solution), different storeviews, all accessible through the same domain but an extension is then redirecting to the correct storeview based on customer location.
I have one storeview for Germany, one for USA, and a fallback worldwide, the first is in EUR and tax included, the second and third are in USD and tax excluded.
I submit my product price with the structured data scheme (itemprop).
I have one sitemap for each storeview and submit them all to Google.
The problem : In Germany, when I google my product, I got my URL from my worldwide storeview (which is not the killer as my extension will redirect afterwards) but with the USD price.
How to do so that I submit my sitemap from the germany storeview to Google.de and not my worldwide storeview.
Use ccTLD
The best way to target different countries is to use ccTLD.
This is what they're made for and Google use it to determine the targeted location of your website.
Configure Google Webmaster Tools
In the Google webmaster tools, you can set your geographic target to a website.
As said on Google Help Center:
Set a geographic target:
On the Webmaster Tools Home page, click the site you want.
Click the gear icon (top right corner), and then click Site Settings.
In the Geographic target section, select the option you want.
If you want to ensure that your site is not associated with any country or region, select Unlisted in the drop-down list.
Use Link rel alternate hreflang
You can use the declaration of different language version to target countries in the <head>of your pages.
This use the <link> tag like this :
<link rel="alternate" href="http://example.com/fr" hreflang="fr-FR" />
<link rel="alternate" href="http://example.com/de" hreflang="de-DE" />
<link rel="alternate" href="http://example.com/us" hreflang="en-US” />
<link rel="alternate" href="http://example.com/" hreflang="x-default" />
You need to declare every version of each URL on every pages. Exemple above needs to be on every URL of the example.
Read further on Google Help Center about telling Google your different localized target.

Joomla doesn't show my language characters

When I post link to my article on Facebook, then Facebook loads a part of site, so I can see some text from this article, but I get "poniedziaÅek", but should be "poniedziałek" it just doesn't show polish characters. I have set up
<meta content="text/html; charset=utf-8" http-equiv="content-type">
but nothing, still have some weird characters.
Try experimenting with unicode alias settings in joomla global configuration.
Also take a look at these:
Problem with facebook and polish characters in links
Non ASCII-7 characters in URL (article alias)
Unicode urls

Ajax magic: How is Kotaku achieving Ajax *and* Google accessability?

Kotaku has launched a new design without hashbangs. Their site still clearly uses ajax requests, but somehow it is still found through Google and the content shows up in the pagesource. How do they do it? Their text seems to be contained inside a script type=text/javascript, but I don't understand what effect that has, or why they would do that.
(of course, the first page request may just trigger a static, serverside constructed response. But check other articles, it does load json through an ajax request. No page refresh)
Have a look at this site for example:
http://kotaku.com/5800326/read-some-of-new-tomb-raider-game-right-now
No hashes, a very well formed URL and it appears in Google. I have read the Google Ajax guide, and as far as I understand it, Google only requests an html snapshot iff you use #! inside your url.
For your convenience, I have made a screenshot that shows how the text looks inside the Chrome debugger: (what does "ganjaAjaxContent" mean?)
If you search for this article, it is the first match in Google:
Google search for Kotaku article
Being able to do ajax without having to worry about Google search would be excellent.
Kotaku and the other Gawker sites are doing a number of things for SEO:
Submitting XML sitemaps for all of their content
http://kotaku.com/sitemap_today.xml
http://kotaku.com/sitemap.xml
Correct use of title and description tags for Google and Facebook
<title>Read Some of New Tomb Raider Game Right Now</title>
<meta name="fragment" content="!">
<meta name="title" content="Read Some of New Tomb Raider Game Right Now" />
<meta name="description" content="Upcoming Tomb Raider reboot doesn't have a release date yet, but website Siliconera apparently has the game's script and published what's reportedly an excerpt from it. Check it out. [Siliconera]" />
<meta property="og:title" content="Read Some of New Tomb Raider Game Right Now" />
<meta property="og:description" content="Upcoming Tomb Raider reboot doesn't have a release date yet, but website Siliconera apparently has the game's script and published what's reportedly an excerpt from it." />
Displaying HTML post content when Javascript is turned off (inspect the <div class="post-body quick-post"></div> element)
So you're right, Google's first visit loads the semantic, accessible serverside-constructed page. WHile Google can crawl hashbang pages, it doesn't need to, because all of the pages are indexed via the sitemap.xml
Hope this answers all of your questions.
p.s. having said all this, hashbangs are still bad for the web
http://www.tbray.org/ongoing/When/201x/2011/02/09/Hash-Blecch
http://isolani.co.uk/blog/javascript/BreakingTheWebWithHashBangs
http://blog.benward.me/post/3231388630

Resources