Using The Modules
Module Features
As a minimum before you can use any of the modules, you need to set up your site config.
Nuxt SEO Module
A collection of SEO features that don't fit anywhere else.
- Automatic default meta for your site.
- Automatic fallback title for your site.
- Opt-in breadcrumbs with Schema.org support
Sitemap
Automatically generates a sitemap for your site
- When prerendering or using static only routes, no config is needed, it will automatically generate a sitemap for you.
- If you have dynamic routes, you'll need to set up a handler for Dynamic URLs.
Robots
Automatically generates a robots.txt, X-Robots
and robot meta tags for your site.
- If you have any other environments besides development and production, you need to configure the
env
option. See the Disabling Indexing guide for more information. - By default, all routes are allowed for all user-agents. See Disabling Page Indexing to start blocking routes.
OG Image
Generate dynamic Open Graph images for your pages.
- Opt-in, by default, it won't do anything unless you configure it.
- See the Tutorial: Getting Familiar With Nuxt OG Image docs on setting it up.
Note: If you don't intend to generate dynamic images, it's recommended to disable this module.
Schema.org
Automatically generates schema.org JSON-LD for your pages.
- Provides default Schema.org for your pages.
- It's recommended to set up an Identity for your site as well.
- You can opt in to more Schema.org using useSchemaOrg.
Link Checker
Checks all links for issues that may be affecting your SEO.
- When building your site it will check links
- You can also run it manually by opening the "Link Checker" tab in Nuxt DevTools
SEO Experiments
A few extra SEO Nuxt features that don't fit anywhere else.
- See the SEO Experiments Features guide for more information.
- Automatic File Metadata Icons and Open Graph Images
- Opt in seoMeta in your nuxt.config and route rules
Disabling Modules
Since Nuxt SEO installs and enables modules for you, you may run into a situation where you want to disable a module.
The modules have these config keys:
nuxt-og-image
-ogImage
@nuxtjs/sitemap
-sitemap
@nuxtjs/robots
-robots
nuxt-seo-experiments
-seoExperiments
nuxt-schema-org
-schemaOrg
nuxt-link-checker
-linkChecker
You can disable any of these modules by setting the module's enabled
value to false
in your nuxt.config.ts
file.
export default defineNuxtConfig({
ogImage: {
enabled: false
},
sitemap: {
enabled: false
},
robots: {
enabled: false
},
seoExperiments: {
enabled: false
},
schemaOrg: {
enabled: false
},
linkChecker: {
enabled: false
}
})
Keeping workers under 1mb
If you are using Nuxt SEO in a serverless environment, you may want to keep your workers under 1mb. The module that
will contribute the most to your worker size is nuxt-og-image
.
If you are not using ogImage
, you can disable it, otherwise consider prerendering your images.