Robots screenshot

Robots

Author Avatar Theme by Nuxt modules
Updated: 10 Jan 2026
506 Stars

Tame the robots crawling and indexing your Nuxt site.

Categories

Overview

@nuxtjs/robots is a Nuxt.js module that allows you to easily generate a robots.txt file for your website. It injects a middleware that handles the generation of the robots.txt file based on the configuration provided.

Features

  • Nuxt 3 and Nuxt Bridge support
  • Generate robots.txt for static mode
  • Add middleware for robots.txt

Installation

To install the @nuxtjs/robots module, you need to add it as a dependency to your project. You can do this by running the following command:

npm install @nuxtjs/robots

Next, you need to add @nuxtjs/robots to the modules section of your nuxt.config.js file:

module.exports = {
  modules: [
    '@nuxtjs/robots',
  ],
}

Summary

@nuxtjs/robots is a handy Nuxt.js module that simplifies the process of generating a robots.txt file for your website. With its support for Nuxt 3 and Nuxt Bridge, it seamlessly integrates into your project. The module provides features like generating robots.txt for static mode and adding a middleware for robots.txt handling. Installing and configuring the module is straightforward, making it a convenient choice for managing your website’s robots.txt file.