How to localise html5 meta tag information - html

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.

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.

Recommended Syntax for HTML meta title and description?

I've been told that adding a different meta title and description per page is strongly recommended.
What is the correct way to do this? Is there a recommended naming convention for the title? I assume there's a standard for this rather than whatever the developer decides is best.
At first I would recommend to sign in to the Google Webmaster Tools. There you sign in your website and get a lot of information and resources to improve the information structure of your website.
Here you have an article from Google about the topic: Meta tags that Google understands
About the meta name="description" element:
<meta name="description" content="A description of the page" />
This tag provides a short description of the page. In some situations this description is used as a part of the snippet shown in the search results.
About the title element:
<title>The Title of the Page</title>
While technically not a meta tag, this tag is often used together with the "description". The contents of this tag are generally shown as the title in search results (and of course in the user's browser).
Also think about implementing structured data, see schema.org.
I think it is important these days to have a web standards based, clean and semantically rich HTML markup for your whole page.
title
(Note that the title element is not a "meta title".)
HTML5 defines that the title element should identify documents "even when they are used out of context". So for a typical website, you should always include the site name in the title.
For usability reasons, it’s most of the time a good idea to specify the page name before the site name (e.g., page name – site name).
HTML5 doesn’t recommend a delimiter for separating the page name from the title.
meta-description
HTML5 defines that the description metadata name is used to "describe the page". The value must be "appropriate for use in a directory of pages, e.g. in a search engine".
As the homepage typically represents the whole site, it’s appropriate to describe the site (instead of the page) in the homepage’s meta-description.

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.

Are HTML Meta Tags still important? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I read some articles on Internet, some said that search engine like Google and Bing don't care about HTML Meta Tags any more. Should I still need to maintain the HTML Meta Tags in my website properly?
Thanks!
Are meta tags critical? Every search engines emphasizes meta tags differently. Google doesn't let the public know how it uses meta tags. I have noticed that a lot of websites show up on the first page of Google for specific subjects and yet they don't have any keyword or description tags. So don't let anybody fool you by exaggerating how important they are for Search Engine Optimization. Search engines index algorithms vary greatly -- some assign a lot of importance to meta tags, so it is a good idea to use them.
Meta tags are lines of code that are hidden in web pages. The code information is not revealed in the web browser (but refer to the discussion of the description tag, below) but they are utilized by search engines to help categorize your web content. It is possible that you might choose to omit descriptions, or keywords, but your site won't look right if you don't put a "title" tag, since the web browsers will show it as "Untitled".
In order to obtain traffic (by cheating) a long time ago, people would place repetitive or irrelevant information into their meta tags -- "stuffing" them. As a penalty, several search engines don't put too much importance on keywords in meta tags, but they still look at them to be certain they have meaning. Whichever the case, your rank will probably suffer on other search engines if you lack meta tags, or have useless keywords.
The "head" section of a web page is where meta tags are found. Some people suggest using only lowercase letters in your tags, and avoid repeating terms within the keyword tag.
Generally speaking, the actual meta tag contents appear invisible; however the "description" meta tag's contents will turn up in the majority of search engines together with the page title in the search results. Do not overdo your meta description; you can place keywords in the description tag, but try to keep language natural, in complete sentences, and keep it short and relevant.
In short, yes - META tags are important. But not all of them.
Purely from search engine listings - Always include a useful META DESCRIPTION thats unique for every page - even if that doesn't bump you up the rankings, a good succinct description will do wonders for your click throughs and bounce rates, because people are more likely to think they can find what they are looking for.
I would also include META KEYWORDS although it should be said that its probably of no use - so I generally pick out some site wide keywords and use them throughout.
Other META tags have uses such as the ROBOTS tag, and the like - but they are for other purposes.
here is the thing: what do you summarize as meta tags, do you only mean meta tags or everything in the
<head>
of your HTML? the sloppy definition of meta tags mostly includes these elements as well.
these "meta" tags are still very very important for efficient SEO.
<title></title> (not really a meta tag, but in the <head> section) because google uses it (in most cases) as the headline of the listing in the SERP
<meta rel="description" content="because google uses this text here as the snippet text of the SERP (in most cases) listing">
<meta content='noindex, nofollow, noarchive, nosnippet' name='robots'/>
a very efficient directive to control the indexing behavior (and to some extend the crawling behavior and value allocation) of google
<meta name=”robots” content=”noodp”>
get rid of snippets that use http://www.dmoz.org/ for descriptions
<meta name="robots" content="noimageindex">
advises google to not index the images found on this page (but they might get indexed if they are used on other pages)
<link href='http://www.example.com/en/vienna/cha-no-ma' rel='canonical' />
(not meta, but in the head) communicate a canonical URL (the one you would like to get indexed) to the search engines.
<link href="http://www.example.com/en/vienna/b/billa" hreflang="en" rel="alternate" />
together with the canonical a cool way to communicate alternate language versions of a page to google
<link href='http://microformats.org/profile/hcard' rel='profile' />
if you want to achieve rich snippets in google by using microformats, these meta informations are necessary.
<META http-equiv="Content-Type" CONTENT="text/html; charset=iso-8859-1">
indication of content type and encoding
<META NAME="google-site-verification" CONTENT="+nxGUDJ4QpAZ5l9Bsjdi102tLVC21AIh5d1Nl23908vVuFHs34="/>
a way to verify your site for google webmaster tools
stuff that is not important:
meta keyword tag, just forget about it. its useless (and if you put spammy words in it even of negative value)