When I search for 'stackoverflow' in Google, it displays Stack Overflow's cookies policy instead of the meta description. Like:
Is it a bug?
Just to clarify I am from the EU, so I need to accept cookies.
It's not a bug, per se. The text in question is the first significant text you come to on the page (below the header, which has no real text to speak of), in terms of the order of HTML
They have a valid meta description tag.
<meta name="description" content="Stack Overflow is the largest, most trusted online community for developers to learn, share their programming knowledge, and build their careers.">
Google, somehow, thinks that cookie text is more relevant. It's not really fixable by Stack Overflow directly. As noted elsewhere, they could always add the nosnippet
tag
<meta name="robots" content="nosnippet">
but that might be worse, not better. I'd just leave it be if I were them. If you're searching for "Stack Overflow", which shows the site index page, that does a good job of explaining what SO does. My bet is few people find the home page by searching anyways, compared to searching for specific problems.
<header>
tag.