Releases: nuxt-modules/robots
v5.1.0
✨ v5.1.0
🤖 No Index Build Directory
This minor version introduces improvements around your nuxt asset build directory getting indexed (/_nuxt/*
). It will now add X-Robots-Tag
to these files and make sure they don't end up on Google.
If you have these paths ignored for your robots.txt the module will warn you as they need to be accessible by robots to crawl your pages correctly.
To accommodate this feature the disallowNonIndexableRoutes
config has been deprecated and set to false by default (previously true). You may notice your robots.txt has different output but your site indexing will remain the same.
Changelog
⚠️ Deprecations
- Deprecate
disallowNonIndexableRoutes
- by @harlan-zw in #173 (53928)
🚀 Features
- Set
noindex
header for build asset dir/_nuxt
- by @harlan-zw in #174 (1253c)
🐞 Bug Fixes
- Warn when blocking
/_nuxt
or/api
paths in robots.txt - by @harlan-zw (1293a) - Gracefully handle broken nuxt content endpoint - by @harlan-zw (6a238)
View changes on GitHub
v5.0.1
🐞 Bug Fixes
- Nuxt content check at module setup - by @sandros94 in #170 (00c4f)
View changes on GitHub
v5.0.0
Introduction
The v5 major of Nuxt Robots is a simple release to remove deprecations and add support for the Nuxt SEO v2 stable.
⚠️ Breaking Features
Site Config v3
Nuxt Site Config is a module used internally by Nuxt Robots.
The major update to v3.0.0 shouldn't have any direct effect on your site, however, you may want to double-check
the breaking changes.
Removed rules
config
The v4 of Nuxt Robots provided a backward compatibility rules
config. As it was deprecated, this is no longer supported. If you're using rules
, you should migrate to the groups
config or use a robots.txt file.
export default defineNuxtConfig({
robots: {
- rules: {},
+ groups: {}
}
})
Removed defineRobotMeta
composable
This composable didn't do anything in v4 as the robots meta tag is enabled by default. If you'd like to control the robot meta tag rule, use the useRobotsRule()
composable.
- defineRobotMeta(true)
+ useRobotsRule(true)
Removed RobotMeta
component
This component was a simple wrapper for defineRobotMeta
, you should use useRobotsRule()
if you wish to control the robots rule.
Removed index
, indexable
config
When configuring robots using route rules or Nuxt Content you could control the robot's behavior by providing index
or indexable
rules.
These are no longer supported and you should use robots
key.
export default defineNuxtConfig({
routeRules: {
// use the `index` shortcut for simple rules
- '/secret/**': { index: false },
+ '/secret/**': { robots: false },
}
})
🚀 Features
Config blockAiBots
AI crawlers can be beneficial as they can help users finding your site, but for some educational sites or those not
interested in being indexed by AI crawlers, you can block them using the blockAIBots
option.
export default defineNuxtConfig({
robots: {
blockAiBots: true
}
})
This will block the following AI crawlers: GPTBot
, ChatGPT-User
, Claude-Web
, anthropic-ai
, Applebot-Extended
, Bytespider
, CCBot
, cohere-ai
, Diffbot
, FacebookBot
, Google-Extended
, ImagesiftBot
, PerplexityBot
, OmigiliBot
, Omigili
Changelog
🚨 Breaking Changes
- Upgrade to nuxt-site-config v3 - by @harlan-zw (4c396)
- Drop all deprecations - by @harlan-zw (a53f4)
- Drop all deprecations - by @harlan-zw in #167 (f499c)
🚀 Features
blockAiBots
config - by @harlan-zw in #166 (aa827)
View changes on GitHub
v4.1.11
No significant changes
View changes on GitHub
v4.1.10
🐞 Bug Fixes
- Support missing runtimeConfig - by @KoujiSano in #155 (1cc6a)
- Disable nuxt content integration for v3 and cloudflare - by @harlan-zw (78979)
View changes on GitHub
v4.1.9
🐞 Bug Fixes
- Disallow
/robots.txt
when using baseURL - by @harlan-zw (c8958) - Comments being treated as errors - by @hacknug in #152 (ee973)
View changes on GitHub
v4.1.8
🐞 Bug Fixes
- Case insensitive directives when merging robots.txt - by @botic in #150 (f4d60)
- Warn when unknown directives are used - by @harlan-zw (f98c2)
- Add developments hints as comments - by @harlan-zw (96e84)
- devtools: Add robots.txt code highlighting - by @harlan-zw (a423d)
View changes on GitHub
v4.1.7
v4.1.6
No significant changes
View changes on GitHub
v4.1.5
No significant changes