More Premium Hugo Themes Premium Nuxt Themes

Nuxt Simple Robots

(Migrated to @nuxtjs/robots) Tame the robots crawling and indexing your Nuxt site.

Nuxt Simple Robots

(Migrated to @nuxtjs/robots) Tame the robots crawling and indexing your Nuxt site.

Author Avatar Theme by harlan-zw
Github Stars Github Stars: 111
Last Commit Last Commit: Nov 6, 2024 -
First Commit Created: Jan 15, 2024 -
Nuxt Simple Robots screenshot

Overview

The Nuxt Simple Robots is a helpful tool for managing and controlling the indexing and crawling behavior of search engine bots on your website. It offers various features to easily merge existing robots.txt files or create a new one programmatically. Additionally, it provides automatic generation of X-Robots-Tag headers and <meta name=“robots” …> meta tags. The plugin seamlessly integrates with route rules and runtime hooks, allowing for granular control over search engine indexing. The plugin also disables non-production environments from being indexed, solving common issues and following best practice default configuration.

Features

  • Merge in existing robots.txt or programmatically create a new one: The plugin allows you to easily incorporate your existing robots.txt file into your Nuxt project or create a new one dynamically.
  • Automatic X-Robots-Tag header and <meta name=“robots” …> meta tag: Nuxt Simple Robots takes care of generating the necessary X-Robots-Tag headers and <meta name=“robots” …> meta tags for your web pages, eliminating the need for manual implementation.
  • Integrates with route rules and runtime hooks: With this plugin, you can define custom rules and hooks to control search engine indexing behavior based on specific routes or runtime conditions.
  • Disables non-production environments from being indexed: Nuxt Simple Robots ensures that non-production environments, such as staging or development, are not indexed by search engines, preventing accidental exposure of unfinished or test versions of your website.

Installation

To install the Nuxt Simple Robots plugin, you need to follow these steps:

  1. Add the nuxt-simple-robots dependency to your project using your preferred package manager (npm or yarn).

  2. Open your nuxt.config.js file.

  3. In the modules section of the configuration file, add 'nuxt-simple-robots' as an entry.

    Example:

    export default {
      modules: [
        'nuxt-simple-robots',
      ],
    }
    
  4. Save the file and start or rebuild your Nuxt project.

For more detailed information and configuration options, refer to the full documentation.

Summary

The Nuxt Simple Robots plugin is a valuable tool for managing search engine indexing behavior in Nuxt projects. With its ability to merge existing robots.txt files or generate a new one programmatically, automatic generation of X-Robots-Tag headers and <meta name=“robots” …> meta tags, integration with route rules and runtime hooks, and automatic disabling of non-production environments from being indexed, the plugin offers an intuitive solution to control how search engine bots interact with your website. Its easy installation process and comprehensive documentation make it a convenient choice for Nuxt developers.