Unhead
Set route-specific titles, descriptions and canonical URLs in a Vue application and check the delivered HTML.
Community support
Upvotes come from SearchEngineAnswer members. GitHub stars and reader reviews are counted separately.
Claim this tool if you maintain it.
- Best for
- Publishing
- Setup required
- Use the Vue 3 adapter with a Node.js project. This tutorial assumes a working Vite Vue server-rendering setup and Unhead v3.
- Costs to check
- MIT-licensed package. No paid service is needed for generating the metadata in this example.
- License in catalog
- MIT
GitHub repository
- GitHub stars
- 1,314
- Forks
- 83
- Last push
- 2026-11-20
- Primary language
- TypeScript
GitHub snapshot from . Stars count GitHub bookmarks. Reader ratings appear separately below.
How to install Unhead
-
In the Vue project, install the Vue adapter with pnpm add @unhead/vue.
pnpm add @unhead/vue - Register createHead from @unhead/vue/client in the browser entry. In the server entry, create a fresh instance from @unhead/vue/server for each request.
- Pass the server instance and complete HTML template to transformHtmlTemplate before sending the response.
First tutorial for Unhead
-
Set distinct metadata for two routes using useHead. Replace the illustrative example.com canonical with the intended absolute URL.
import { useHead } from '@unhead/vue' useHead({ title: 'Migration checklist', meta: [{ name: 'description', content: 'Steps for checking a site move.' }], link: [{ rel: 'canonical', href: 'https://example.com/migration-checklist/' }], }) - Open View Page Source on each route. Verify a single title, description and canonical with the values for that route.
- Navigate between both routes through the app. Inspect the live head to confirm the previous canonical is replaced.
Documentation reviewed on November 20, 2026. The tutorial is a proposed check with illustrative files and URLs.
Where Unhead fits
Choose Unhead when Vue route components need to supply metadata through a shared document head manager.
- When to choose another tool
- Use the metadata integration already provided by Nuxt when it covers the task. The standalone Vue adapter is for a separately managed setup.
- First evaluation
- Create two test routes with different page titles and canonical URLs. Load each directly and then navigate between them in the browser.
- How to interpret the result
- The raw HTML should contain the route's expected canonical before JavaScript runs. Check for stale or duplicate tags after navigation and verify the chosen URL separately.
Reviews and discussion
Reader reviews
Be the first to share your experience with this tool.
Discussion
Ask a question or share a setup tip.
Flag an outdated detail
Include the field that needs updating and a source link. Copy your draft, then use the corrections policy to contact the editorial team.
Write a review or join the discussion