I'm working on a web-site that I need to Search Engine Optimize for multiple-languages.

  1. I need to provide language specific keywords targeting the crawler. Someone suggested using <meta name="keywords" ... was a bad idea since crawlers ignored it; they suggested using HTTP headers. Unfortunately I do not know what Header line to use with CGI scripting.

  2. Can this be done using plain HTML5?

  3. What are my options in this regard if I cannot use CGI. (SSI? etc)

  • Why is using meta tags a problem for translating your pages? Commented Dec 16, 2014 at 9:05
  • If it is only meta keywords that are bothering you, you can just remove them. Google doesn't use meta keywords anymore. Commented Dec 16, 2014 at 9:05
  • @StephenOstermiller well - i plan on using: <head><link rel="alternate" hreflang="en" href="url/en/index.html" /> But if i do this, it would make sense to use <meta name="keywords" content="ENGLISH KEYWORDS" except that Google ignores that! So then how do i do support multiple languages (basically inform the Search engine that the content is the same, the language is different) AND feed it language specific keywords? Yes I can remove meta-keywords, but how do i proceed after that? Doing this using CGI-headers feels shady - is that even legal to do?
    – Ravi Swamy
    Commented Dec 16, 2014 at 9:29
  • SSI looks cleaner.. but I know nothing about this and they seem suited for simple text changes.
    – Ravi Swamy
    Commented Dec 16, 2014 at 9:31
  • 1
    Side note: As explained in my answer to your other question, cn is not a valid value.
    – unor
    Commented Dec 16, 2014 at 13:26

1 Answer 1


The suggestion doesn’t make sense. You can’t specify meta-keywords in an HTTP header. (Only meta elements with an http-equiv instead of a name attribute can alternatively be specified with HTTP headers.)

It’s also not true that you would need CGI for sending an HTTP header. This could be achieved directly within your server configuration, too (for example, mod_headers for Apache).
And there’s nothing "shady" about CGI at all; many sites use PHP, Python etc. to generate/process documents and set HTTP headers.

So, that said:

If you want to use meta-keywords (ignoring the discussion about its usefulness here), simply use it.

If you want to specify the keywords in different languages on the same document, simply add several meta-keywords elements with the lang attribute:

<!-- on the English page, e.g., with 'lang="en"' on the 'html' element -->
<meta name="keywords" content="…"> <!-- using the default language as specified on 'html' or 'head' -->
<meta name="keywords" lang="de" content="…"> <!-- German keywords -->
<meta name="keywords" lang="fr" content="…"> <!-- French keywords -->

But if you have translated documents, you’d typically only include meta-keywords in the respective language.

Linking to translations, as you know, can be achieved by using the link element with the alternate link type and the hreflang attribute:

<link href="/de/" rel="alternate" hreflang="de">


So for a site in English and German, you might want to include this on the English page:

<!-- lang="en" -->
<meta name="keywords" content="…"> <!-- English keywords -->
<link href="/de/" rel="alternate" hreflang="de">

and this on the German page:

<!-- lang="de" -->
<meta name="keywords" content="…"> <!-- German keywords -->
<link href="/en/" rel="alternate" hreflang="en">
  • thanks :) pretty much covers everything I wanted to know.
    – Ravi Swamy
    Commented Dec 16, 2014 at 15:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.