Four common metatags and what each does
The description tag gives a short summary, which can become the snippet under a search result. The viewport tag tells phones to fit the page to the width of the screen, and every responsive site needs one.
The robots tag gives search engines instructions. Adding noindex to it keeps a page out of their results. A tag named googlebot does the same job for Google's crawler alone. The keywords tag was once used to list a page's keywords, but Google has ignored it for years, so it's safe to leave it out.
There are plenty of others. The theme-color tag, for example, sets the colour of the browser bar on some phones.
<head><meta name="description" content="Kitchens fitted across Essex…">01<meta name="viewport" content="width=device-width, initial-scale=1">02<meta name="robots" content="noindex">03<meta name="keywords" content="kitchens, essex, fitters">04</head>
- 01descriptionMay be used as the snippet in search results
- 02viewportSizes the page to the width of a phone screen
- 03robotsAsks search engines not to index the page
- 04keywordsIgnored by Google for ranking
How meta tags are written
Each meta tag has a name or a property that says what kind it is, and a content value. They all sit inside the page's head, and a page can have as many as it needs.
Open Graph tags start with og:. They set the title, description, and image that appear when someone shares a link on social media. The charset tag tells the browser which character set the text uses, so letters and symbols display properly.
The metatags at the top of our own pages
Our live website and the new one we're building both start every page with a handful of meta tags.
bird.co.uk/contact/ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5" />…<meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' />Viewport and robots on our live siteOur live contact page tells phones to fit it to the screen, while still letting people zoom in. Its robots tag allows indexing and the following of links. It also lets Google show a large image preview and a snippet of any length.
Our new site's layout <meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title>{meta.title}</title><meta name="description" content={meta.description} />…<meta property="og:description" content={meta.description} />Written once for every pageOn our new site, these tags are written once, in the layout that every page shares. Each page passes in its own title and description. The same description also fills the og:description tag, which is used when the page is shared.
Metatag mistakes worth checking for
A noindex tag left on a live site after launch is one of the most common. It quietly keeps pages out of Google until someone spots it. Two robots tags that contradict each other cause trouble too, as does a viewport tag that stops people zooming in. Checking the head of your main page templates after each release catches most of these problems.

