Search engine optimization with tips for Vue and Nuxt
31.03.2025
In this article, I want to outline the fundamental SEO practices that every website should apply to achieve strong results in Google Search. I’ll also share tips on how to implement these practices in Vue and Nuxt.
SEO differentiates between technical measures and content-focused improvements.
A sitemap file lists every page on the website. Search engines read this file and use it as a guide for the crawler that indexes the site. The sitemap usually has the file name sitemap.xml and lives in the website’s root directory. For Vue and Nuxt you can use the @nuxtjs/sitemap module. You can find the sitemap, for example, at https://foxwebcraft.com/sitemap.xml.
The file robots.txt is a text file that specifies which pages search engine bots are allowed to index. This file is stored in the website’s root directory. You can also define which pages should be excluded from indexing. Here’s an example of a standard robots.txt file:
User-agent: *
Allow: /
Sitemap: https://foxwebcraft.com/sitemap.xml
For Nuxt you can use the @nuxtjs/robots module. It offers additional features to modify the robots.txt file. Here’s a useful article on the topic: Controlling Web Crawlers in Vue & Nuxt
Most websites don’t pay enough attention to a proper page structure. For search engines, the hierarchy of headings provides crucial hints about the content and the importance of individual sections. A solid page structure includes one H1 heading and any number of H2, H3, and H4 headings. Make sure the order is correct—an H2 should follow an H1 (not an H4).
Another important area that’s often neglected is the imagery on the site. Keep these points in mind for SEO:
watch-casio-CS-1000.webp.silver Casio watch on wrist.<NuxtImg> or <NuxtPicture> tags to generate responsive images automatically.Meta tags control which information appears in Google search results and help Google understand the page. The most important meta tags are:
title: The page title shown as the headline in Google search.description: The meta description shown in Google search. Include the page’s key keywords and a brief summary of the content.image: The image that appears in Google search results.ogTitle: Displayed as the headline. It can match the title.ogDescription: The page description. It can match the description.ogImage: The image shown when the page is shared on social media. It can match the image.ogType: The page type, e.g. website or article.ogSiteName: The website name, e.g. FoxWebcraft.twitter:card: The card format, e.g. summary_large_image.For Vue and Nuxt you can use the useSeoMeta composable. Here’s an example implementation:
useSeoMeta({
title: 'Basic SEO',
ogTitle: 'Basic SEO',
description: 'Search engine optimization with tips for Vue/Nuxt',
ogDescription: 'Search engine optimization with tips for Vue/Nuxt',
image: 'https://foxwebcraft.com/images/blog/seo-image.webp',
ogImage: 'https://foxwebcraft.com/images/blog/seo-image.webp',
ogType: "article",
ogSiteName: "FoxWebcraft",
twitterCard: "summary_large_image",
});
This configuration results in the following HTML:
<head>
<title>Basic SEO</title>
<meta property="og:title" content="Basic SEO">
<meta name="description" content="Search engine optimization with tips for Vue/Nuxt">
<meta property="og:description" content="Search engine optimization with tips for Vue/Nuxt">
<meta name="image" content="https://foxwebcraft.com/images/blog/seo-image.webp">
<meta property="og:image" content="https://foxwebcraft.com/images/blog/seo-image.webp">
<meta property="og:type" content="article">
<meta property="og:site_name" content="FoxWebcraft">
<meta name="twitter:card" content="summary_large_image">
</head>
Page speed is a major factor in SEO. Keep these tips in mind:
Ensure the page content is easily readable on every device.
So far we’ve covered the technical measures. Now let’s look at the content improvements. Effective SEO is built on high-quality, user-focused content. Here are some tips:
Google Search Console lets you ensure Google indexes all your pages. It also highlights discoverability issues so you can fix them.
Google Analytics enables you to analyze the website’s traffic.
I use Seobility to test SEO measures. It lets you run five free requests per day, which is usually enough to validate the optimizations and identify improvements.
If you implement all the measures listed here, nothing stands in the way of great Google Search results. It can take some time for the changes to show up in search rankings, but they always lead to a better user experience—and that alone justifies the effort that goes into SEO.