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

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.

Related

Proper use of meta tag for keywords

I'm making a website and I need it to pop up on google search. It´s for a niche topic so it shouldn't be hard to find.
I've been using the meta tag to add keywords and my page has been indexed by google. Search console also tells me that some people have clicked on it.
I´m using it like this:
<meta name="keywords" content="keyword1, keyword2, keyword3, keyword4, ...">
I'm sure this is a common issue but I can´t find a way to fix it.
The proper use is you don't use this tag at all.
This tag is not used like 20 years already.
Google doesn't take it in consider nor do any other search engine.
Therefore you can write anything to it, Google and any other search engine will ignore it.

Use of specific target_country and country meta tags

The guidebook written by the Brazilian government regarding good practices in web development recommends using the following meta tags:
<meta name="target_country" content="br" />
<meta name="country" content="Brazil" />
It does not provide any explanation for why we should use them, though. The guidebook is a 10 years old document; there are visibly outdated codes there. However, that was not the case with those two meta tags: I could not find whether they are recommended or deprecated by W3C. I could not even find if they actually exist, to begin with.
Are the meta tags target_country and country useful? If so, what for? Are they endorsed by W3C, or considered a good practice by any other relevant institution, browser, social network etc.? Do they help increasing accessibility?
Short answer
Remove them if allowed, they are not valid and serve no purpose.
Long Answer
These definitely aren't part of the current spec for HTML5, I would guess they are HTML4 (if they were even relevant then, people did like to make up meta tags!)
Over on the wiki I can see that both "country" and "target_country" do not exist.
If you really need to display some form of location data use geo.country or geo.region etc. However Google ignores these anyway. so I am unsure if they have much use.
The only thing that I can think they may have been relevant for was for identifying the language of the page, but in HTML 5 you should be using the lang attribute on the HTML tag anyway.
Forget Brazil for a moment because internet standards apply all over the world. That being said, I have never came across that tag in last 2 decades. Looks like outdated information and you shouldn't be worried about it. If (and it's a Big IF) they have made some kind of crawler or a directory/search engine themselves which does gives priority to this tag then it will be just limited in scope to that crawler/directory/search engine.

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.

SEO Language information

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.