Jump to content

HTTP_ACCEPT_LANGUAGE and metatags


SiteSniffer

Recommended Posts

I'm checking browser language by using substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2).Am I allowed to use it for defining metatags keywords or will Google have problems indexing? I'm trying to have differend languages in metatags.

Link to comment
Share on other sites

I'm checking browser language by using substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2).Am I allowed to use it for defining metatags keywords or will Google have problems indexing? I'm trying to have differend languages in metatags.
I'm confused, is your website actually localized? If so you could do:
header('Content-Language: lang, tags, here');

Link to comment
Share on other sites

I ment when my website detects Dutch (nl) browser headers I want the metatags keywords (in header) to be in Dutch. IE <META NAME="keywords" CONTENT="word1, word2, word3">.Does Google check for language and then index a website? If not my routine will be useless I think.

Link to comment
Share on other sites

If, at your site, you have a facility to switch languages, disregarding the value of the Accept-Language header, Google will index both your Dutch and... I'd assume English... pages. As suggested, you can output a Content-Language to explicitly tell Google that the content is in a certain language. I'd argue it's best to only send this header if the language was computed based on the Accept-Language header, but that's just a personal opinion.If you don't have such a facility, but want to switch your keywords... that would be a black hat SEO trick... I wouldn't be surprised if Google goes as far as to penalize you if it detects you.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...