This is such a common question that I think most of us take for granted that it is also a valid one. I'd like to challenge that view. The question in the form above is loaded as it implies some assumptions.
Given humanity's many efforts and failure to agree on an answer to this question, it seems reasonable to conclude that at least some of these assumptions are false. The many humorous and facetious answers further underline the question's dubious nature.
OK, you may argue that not all of my listed assumptions are assumed by the phrasing of the question, but to a greater or lesser degree they are all implied. Granted, some people asking the question may not hold those assumptions and may in fact be open to a broader range of answers than the question really allows. However, this framing of the question is such a common cliche or archetype that it probably doesn't occur to them.
So what would a better question be? My first suggestion would be:
However, in the interests of fairness, this arguably contains other assumptions.
So perhaps we should first be asking whether someone believes life has meaning and whether it is singular or multifarious, before going on to ask the relevant subsequent questions.
Perhaps the difference between these questions seems pedantic, but the usual phrasing of the question, "What is the meaning of life?" biases the answers towards prescriptive, external meaning and against descriptive, existential meaning.
I find the latter more helpful and more practical.
I suspect the phrase "What is the meaning of life?" is popular in cultures with a strong monotheistic influence which presupposes a prescriptive answer. "What makes life meaningful to you?" or the longer approach of several questions still leaves plenty of room for religious people to describe how their religion gives their life meaning, without dictating that it must be the only way a person can find meaning.
"What is the meaning of life?" might still be a good question if you are consulting a guru.
If, on the other hand, you're trying to get to know an acquaintance better, it might be better to ask "What makes life meaningful to you?"