Meta Descriptions in Vue

Meta descriptions get rewritten by Google 70% of the time anyway. Here's how to implement them properly in Vue using composables and let your content do the heavy lifting.
Harlan WiltonHarlan Wilton7 mins read Published Updated
What you'll learn
  • Google rewrites 62-70% of descriptions—focus on page content quality
  • Keep under 160 characters, front-load value for mobile truncation
  • Use useSeoMeta() for type-safe description management

Meta descriptions don't directly impact rankings. They affect click-through rates by giving users context about your page.

<meta name="description" content="Learn how to implement meta descriptions in Vue. Includes reactive content, SEO best practices, and social sharing tips.">

Unlike page titles, descriptions have more flexibility but require careful crafting to be effective.

Quick Facts

  1. Google rewrites most of them: Studies show 62-70% get rewritten (Ahrefs, Search Engine Journal). Good page content matters more.
  2. Length varies by device: Desktop shows ~155-160 characters, mobile ~120. Focus on front-loading value rather than hitting a character count.
  3. Template descriptions are lazy: "Buy {product} at great prices" won't differentiate you. Summarize using AI tools if you're short on time.

Setting Meta Descriptions in Vue

Unhead provides type-safe composables for managing head tags. The useSeoMeta composable is the cleanest way to set descriptions:

useSeoMeta({
  description: 'Your description here'
})

Alternatively, useHead() gives you more control:

useHead({
  meta: [
    { name: 'description', content: 'Your description here' }
  ]
})

Dynamic Meta Descriptions

Use refs for reactive descriptions that update when data changes:

<script setup lang="ts">
const post = ref(null)

onMounted(async () => {
  const response = await fetch('/api/post')
  post.value = await response.json()
})

useSeoMeta({
  // computed getter syntax
  description: () => post.value?.description
})
</script>

Open Graph Description 'og:description'

Facebook, LinkedIn, Discord, Slack, and WhatsApp all use og:description for link previews. X (Twitter) falls back to og:description when twitter:description isn't set—so you can skip the Twitter-specific tag.

useSeoMeta({
  description: 'Technical description for search',
  ogDescription: 'More casual description for social sharing',
  // X falls back to ogDescription, no need for twitterDescription
})

Testing tools:

Using Nuxt?

If you're using Nuxt, check out Nuxt SEO which handles much of this automatically.

Learn more about Meta Descriptions in Nuxt →

Quick Check

Should you use the same meta description on multiple pages?

  • Yes, for consistency - Creates duplicate content signals and wastes the opportunity to describe each page
  • No, each page needs a unique description - Correct! Unique descriptions help differentiate pages and improve CTR
  • Only for similar pages - Even similar pages should have distinct descriptions highlighting their differences