useSeoMeta() for type-safe description managementMeta 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.
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' }
]
})
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>
'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:
If you're using Nuxt, check out Nuxt SEO which handles much of this automatically.
Learn more about Meta Descriptions in Nuxt →
Should you use the same meta description on multiple pages?
Yes, for consistency - Creates duplicate content signals and wastes the opportunity to describe each pageNo, each page needs a unique description - Correct! Unique descriptions help differentiate pages and improve CTROnly for similar pages - Even similar pages should have distinct descriptions highlighting their differences