Overview
A meta description is the two-line snippet Google often shows below a search result title. It does not directly affect ranking, but a well-written description raises click-through rate (CTR), which tells Google the result is satisfying searcher intent. Write one for every page, make it specific, include the primary keyword once, and keep it under 160 characters. The broader on-page SEO rules live in content.
Prerequisites
- The target keyword for the page. Use keyword-research to find it if you have not already.
- Access to Google Search Console (GSC) for measuring CTR after the change.
- A way to set
<meta name="description">for your framework. Most static site generators read from frontmatter (description:field). Next.js uses the Metadata API; see nextjs-metadata-api.
Steps
1. Find the primary keyword and searcher intent
The description should match what the searcher wants to find. A page targeting “how to set up Postgres locally” should confirm in the description that the page answers that exact question.
Run a quick search for your target keyword and read the top 5 existing descriptions. Note what they promise. Your description must offer something concrete they do not, or be clearer.
2. Write the description: rule first, benefit second
Lead with the rule or the outcome, not a label. “Learn how to” is a label. “Install Postgres, create a role, and connect in under 10 minutes” is an outcome.
Good structure: primary keyword + specific outcome + differentiator.
Install Postgres 16 on Ubuntu or macOS, create a role and database,
fix peer-auth errors, and connect via psql in under 10 minutes.
That sentence is 118 characters, includes the primary keyword (“Postgres”), states the outcome (“connect via psql”), and names the differentiator (“fix peer-auth errors”). It respects the voice rules from anti-slop: no preamble, no em-dashes, no false-contrast constructions.
3. Count characters and trim to 150-160
Google truncates at roughly 160 characters in desktop results and 120 in mobile. Keep the most important information in the first 120 characters so it survives both truncations.
# Quick character count from the terminal
echo -n "Install Postgres 16 on Ubuntu or macOS, create a role and database, fix peer-auth errors, and connect via psql in under 10 minutes." | wc -c
# 133Do not pad to hit 160 characters. A tight 130-character description is better than a padded 158-character one.
4. Include the primary keyword once, naturally
Do not keyword-stuff. One natural occurrence in the first half of the description is enough. Google bolds matching words in the snippet, which draws the eye.
Avoid repeating the page title verbatim. The description and title appear together; they should be complementary, not redundant.
5. Set the description in your framework
HTML
<meta name="description" content="Install Postgres 16 on Ubuntu or macOS, create a role and database, fix peer-auth errors, and connect via psql in under 10 minutes.">Quartz frontmatter
summary: "Install Postgres 16 on Ubuntu or macOS, create a role and database, fix peer-auth errors, and connect via psql in under 10 minutes."Next.js Metadata API
export const metadata: Metadata = {
description: "Install Postgres 16 on Ubuntu or macOS, create a role and database, fix peer-auth errors, and connect via psql in under 10 minutes.",
};See nextjs-metadata-api for the full Metadata API pattern.
6. A/B test with Google Search Console
After the page is indexed, open GSC > Search Results > filter by the target page URL. Note the current CTR and average position. Change the description, wait 4 to 6 weeks, and compare. A higher CTR at the same average position means the new description is working.
Do not change the description more than once per 4-week window. Changes take time to reflect in GSC data.
Verify it worked
# 1. The description tag is present and under 160 chars.
curl -s https://example.com/page | grep -o '<meta name="description"[^>]*>'
# 2. Google Search Console shows the description in the Enhancements report.
# No "Description too long" or "Duplicate description" warnings.
# 3. Rich results test confirms the description renders in the snippet preview.
# https://search.google.com/test/rich-resultsCommon errors
- Google rewrites the description anyway. Google rewrites when it judges the description does not match the page content. Align the description more closely with the page’s H1 and opening paragraph.
- Description is the same across multiple pages. Duplicate descriptions trigger a GSC warning. Every page needs a unique description. Use the
summaryfrontmatter field to enforce this. - Description is cut off mid-sentence in SERPs. The most important clause is past the 120-character mark. Move it earlier.
- No description tag is present. Google pulls a random excerpt from the page body, often poorly. Always set an explicit description.
- Keyword appears too early and the description reads awkwardly. Natural phrasing first, keyword in context. Never front-load the keyword at the expense of readability.