SEO Language information - html

I was wondering if defining your language in HTML is better for search enigines. For example, I've got a French site, then i've got three options:
1.) have faith that google can say my site is french
2.) define language in the HTML tag
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr">
3.) define language in a meta tag
<meta http-equiv="content-language" content="FR-fr" />
Which option you believe is best? Or which combination of options?

language (language (i.e.: french) != location market (i.e. france)) detection is done on a per page basis (not per site).
it detects the language via the words used on the page (and in the URL), it does not care about the HTML tag (1) and the meta tag (2).
(you can test via the language detect api what language google thinks your page is using http://code.google.com/apis/language/translate/v1/using_rest_langdetect.html )
i always go for the 1 page === 1 language approche. i always make sure that i only have one language per page (translating all of the navigation, making sure that other language content does not and can not show up on the page)

It's probably better to define anything you can and have the search engine disregard it, than to not and leave it completely up to chance. The more information you give them the better.

Usually, I stick with the 3rd one, the content-language meta tag, as described here.

probabay should be on webmasters.stackexchange.com but anyways
You should combine 2 and 3. Faith does not work with bots/spiders.
2.) define language in the HTML tag
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr">
3.) define language in a meta tag
<meta http-equiv="content-language" content="FR-fr" />
good luck

On top of defining your language in the html you can signup for the Google Webmaster tools. On that site you can set your geographic target to France (Site configuration -> Settings).
http://www.google.com/webmasters/tools

andrewk is right - use 2 or 3 , but take into account that in most cases the language will be detected by the robot it self automatically.

Related

HTML: Multiple language meta descriptions?

How can I set two language meta descriptions to my website?
Is this code google valid?
<meta name="description" lang="en" content="english blablabla" />
<meta name="description" lang="hu" content="hungary blablabla" />
Check this post from Google Webmaster Central Blog: http://googlewebmastercentral.blogspot.com.es/2010/03/working-with-multilingual-websites.html
"Google tries to determine the main languages of each one of your pages. You can help to make language recognition easier if you stick to only one language per page and avoid side-by-side translations. Although Google can recognize a page as being in more than one language, we recommend using the same language for all elements of a page: headers, sidebars, menus, etc.
Keep in mind that Google ignores all code-level language information, from “lang” attributes to Document Type Definitions (DTD). Some web editing programs create these attributes automatically, and therefore they aren’t very reliable when trying to determine the language of a webpage."
Some info about multi languages websites:
Since html "lang" attribute doesn't allow define multiple languages, and meta attribute for specify language is obsolete, according to W3 recommendations, it's better to specify language in the HTTP header.
HTTP/1.1·200·OK
Date:·Sat,·23·Jul·2011·07:28:50·GMT
Server:·Apache/2
Content-Location:·qa-http-and-lang.en.php
Vary:·negotiate,accept-language,Accept-Encoding
TCN:·choice
P3P:·policyref="http://www.w3.org/2001/05/P3P/p3p.xml"
Connection:·close
Transfer-Encoding:·chunked
Content-Type:·text/html; charset=utf-8
Content-Language:·en
Like the meta element with the http-equiv attribute set to Content-Language, the value of the HTTP header can be a comma-separated list of language tags
See:
https://www.rfc-editor.org/rfc/rfc2616#section-14.12
As RFC2616 says:
Multiple languages MAY be listed for content that is intended for
multiple audiences. For example, a rendition of the "Treaty of
Waitangi," presented simultaneously in the original Maori and English
versions, would call for
Content-Language: mi, en
If you go to http://validator.w3.org/check and try to validate this:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Language" content="en,hu">
<meta charset="UTF-8">
</head>
<body>
<p>Test</p>
</body>
</html>
W3 validator tool says:
Line 5, Column 52: Using the meta element to specify the document-wide default language is obsolete. Consider specifying the language on the root element instead.
Then, if lang attribute on html tag doens't allow multiple languages, I think your best try will be specify it in HTTP header
The lang attribute may be placed on any element, not just the root html element or meta name="description". So you can write <html lang="en"><body>The Chinese translation of Stack Overflow is <span lang="zh-Hans">堆叠溢位</span></body></html> and it's good to put those lang attributes in because it helps visual browsers to choose the correct fonts and audio browsers for blind people to choose the correct voice.
Some non-Google search engines still want the obsolete <meta http-equiv="content-language"> markup (in particular Bing and Baidu reportedly still want these) but I have no idea if their implementations are standards-compliant enough to cope with two or more languages listed in http-equiv="content-language" (try it and see).
As for whether search engines will honour multiple instances of meta name="description" in multiple languages (with appropriate lang attributes), that depends on the search engine. Google have indicated they don't like side-by-side translations, which is a pity for those of us discussing foreign languages.

Is There any New Rule Regarding Lang attribute in HTML Document?

I see many big sites are not using <html lang="en-US"> or anything similar. Lang is also not available in <Meta> tag. I checked few websites. hub.tutsplus.com and ReadWrite.com are not using any. Few are using as well.
So, I am concerned about:
Is there any effect of Lang attribute on SEO?
Is there any benefits of using lang attribute?
I read that Screen Reader and Search Engine can use this. Anything else? What will be the impact of missing lang attribute.
What will be better: <html lang="en-US"> or <html lang="en"> ?
Update:
I checked that ReadWrite is using Server header "Content-Language". So, Which is better?
Using server side or using lang attribute. From here, I know that lang takes precedence than Meta.
I am an Indian and I just write English (I meant, I cannot say I write US or UK English). In this case, will it be useful to use only lang="en" instead of lang="en-US"?
Does any have impact on performance?
Is there any effect of Lang attribute on SEO?
At least the W3C says that it is "assisting search engines" in a documentation for #lang in HTML 4.01. That information is most likely still valid.
What will be better: <html lang="en-US"> or <html lang="en"> ?
Both are valid according to BCP 47. Actually it is best practice to avoid language subtags unless they really provide useful information for applications that read or display the content. For example it might be, that the regional variants of certain languages recommend the use of different glyps when they are displayed. In that case it would be helpful to tell the application, which regional variant it is facing.
I am an Indian and I just write English (I meant, I cannot say I write US or UK English). In this case, will it be useful to use only lang="en" instead of lang="en-US"?
In your case it is certainly better to use lang="en".
I checked that ReadWrite is using Server header "Content-Language". So, Which is better?
The usage of lang="en" as an attribute to <html> is recommended, if the content really is in English. If you are not so sure about the language of the site's content and merely want to specify the language of your intended audiance, you might rather use a declaration in the HTTP header.
By the way, the W3C has a interesting article on Internationalization Best Practices, on which my answer is based.

How to localise html5 meta tag information

I am building a website designed for 4 different languages, using Sinatra, and using the I18n libs to insert localised content, but I am wondering what to do about the standard HTML5 meta tags for things like description and keywords, and how Google and other search engines will treat them if I localise the content in those tags.
Ideally I want to be able to tell Google (et al), perhaps via information in a sitemap.xml file or something (though I'm not certain that's even possible), that the site may be parsed in these 4 languages, and so present correctly localised keywords, and descriptions to users depending on their locale preference.
Likewise I want to be able to localise the information going out to Twitter and Facebook by localising the relevant og meta tags, and twitter:card` meta tags.
Note: the actual page URLs will be the same no matter the language chosen, localised content is rendered in the Slim templates themselves.
Is it enough, for example, to specify
html lang='de_DE'
I'm after a best-practice and DRY way of achieving nicely localised search result summary information for my international users.
If the different language versions reside at the same URL, then what search engines get is what your server sends to a browser that does specify any language preferences. According to your description, it thus seems that they always get the default (English) version. No meta tags or lang attributes can affect this. (And search engines ignore lang attributes.)
So you should arrange thing so that each language version of a page has a URL of its own. (The difference could be in the query part only, e.g. ?lang=de-DE at the end.) Moreover, the versions should be interlinked, with link elements or with visible a links, so that when a search engine has found one version, it will find the other versions, too, just by following links.
P.S. Writing <meta name=keywords ...> tags is probably waste of time. Google has ignored them long ago.
You can provide meta elements with content in different languages on the same HTML document by using the lang attribute:
<meta name="description" lang="de" content="…" />
<meta name="description" lang="en" content="…" />
<meta name="description" lang="es" content="…" />
<meta name="description" lang="fr" content="…" />
If any third party services like Google or Facebook recognize this is a different question which cannot be answered in general, depends on the specific service, context and the point in time, as things might change rapidly.
However (as Jukka K. Korpela notes, too), in general you should use separate URLs for translations. Give users (and search enginges etc.) the ability to link to a specific language version.

more than one keywords metatag on the website

Is it correct approach to have more than one keywords metatag on the website ?
for example:
<meta name="keywords" content="test1" />
<meta name="keywords" content="test2" />
or is it an error ?
Thank You very much for help
As taken from Webmasters
The keywords meta tag doesn't do anything anymore, at least as far as most search engines are concerned. You're trying to solve a problem that doesn't exist. Search engines index by content nowadays, and they do that without your help.
See the Wikipedia article on the meta tag:
Search engines began dropping support for metadata provided by the meta element in 1998, and by the early 2000s, most search engines had veered completely away from reliance on meta elements. In July 2002, AltaVista, one of the last major search engines to still offer support, finally stopped considering them.
It is not an error; any number of meta tags may be used. But as #Nerd-Herd points out, keyword meta tags are hardly useful at all.
If you use such tags, there is usually no reason to use more than one of them per page, as it is simpler to write just <meta name="keywords" content="test1, test2">.
In theory, if you use keywords of different languages, then you have a reason to use more than one tag, because the language identification is per element, e.g.
<meta name="keywords" content="liberty" lang="en">
<meta name="keywords" content="liberté" lang="fr">
But this is just theoretical, since search engines probably ignore keyword meta tags, and almost surely ignore lang attributes in general.
Meta tags "description" and "keywords" are very important. They should be distinct for each page of website.
We read in "Google Search Engine Optimization Starter Guide"
Description meta tags are important because Google might use
them as snippets for your pages. Note that we say "might" because
Google may choose to use a relevant section of your page's visible
text if it does a good job of matching up with a user's query.
Adding description meta tags to each of your pages is always a good practice in case Google
cannot find a good selection of text to use in the snippet. -Page 6
Emphasise of theirs.

Which one is the right way to add geolocation meta info to a site?

I'm looking how to add meta info to a page.
One way is the meta tag
<metatag name="country" content="Canada" />
another I saw is
<metatag name="geo.country" content="CA" />
using the ISO 3166.
I like the second one because is standard with ISO and easy to understand by crawlers.
Which one of these options is standard? Or most of the crawlers accept them ?
I know that Google does not use any of them, but Bing does.
One site is for desktop web browsers and another one is for WAP (mobile) browsers. Is there any difference?
Why not use both? BTW it's <meta /> not <metatag />
From what I've seen, though, geo.country may be the way to go.
http://marketingblogonline.com/geo-tag-seo.html
I still don't see any reason not to use both, though.
EDIT: Actually, poking around a little more I see that <meta name="country"> doesn't seem to be doing much– http://www.google.com/support/forum/p/Webmasters/thread?tid=0610ddf168b8d424&hl=en.
You also want to consider that a global business probably shouldn't have a country tied to it, anyway. Otherwise you're limiting your customer base.
But, if you are certain that making your website local will help your business, I have just read that HTML5's lang attribute identifies both country and language.
<html lang="en-US">
http://en.wikipedia.org/wiki/ISO_3166-1 –– List of country codes
http://www.rfc-editor.org/rfc/rfc4646.txt –– How to write the lang attribute.