Index of every page on this site: llms.txt

Control Web Crawlers and Crawl Budget in Nuxt

Configure robots.txt, sitemaps, canonicals, and redirects in Nuxt to control crawl budget and block unwanted AI bots.
Harlan Wilton8 mins read Published Updated

Web crawlers determine what gets indexed and how often. Controlling them affects your crawl budget: the set of URLs Google can and wants to crawl on your site. It also lets you state crawl preferences for AI bots that honor robots.txt. Use authentication to protect private content.

Most sites do not need crawl-budget work. Google's rough scope includes very large sites and sites with 10,000+ pages that change daily. AI crawl preferences are a separate decision.

Types of Crawlers

Search engines: Index your pages for search results

Social platforms: Generate link previews when shared

AI training: Scrape content to train models

AI search and user fetches: providers distinguish automated search crawling from user-initiated requests. Allowing a bot does not guarantee a citation.

Malicious: Ignore robots.txt, spoof user agents, scan for vulnerabilities. Block these at the firewall level, not with robots.txt.

Training bots feed your content into model training; search bots fetch it live to answer a specific query. You can block one without the other: disallow GPTBot in robots.txt while leaving OAI-SearchBot untouched if you want your site cited in ChatGPT Search.

Control Mechanisms

MechanismUse When
robots.txtBlock site sections, manage crawl budget, block AI crawlers
SitemapsHelp crawlers discover pages, especially on large sites
Meta robotsControl indexing per page (noindex, nofollow)
Canonical URLsConsolidate duplicate content, handle URL parameters
RedirectsPreserve SEO when moving/deleting pages
llms.txtPublish an optional document index; see the guide for scope and setup
X-Robots-TagControl non-HTML files (PDFs, images)
FirewallBlock malicious bots at network level

Quick Recipes

Block page from indexing: Full guide

pages/admin.vue
<script setup lang="ts">
useSeoMeta({ robots: 'noindex, follow' })
</script>

Block AI training bots: Full guide

public/robots.txt
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: CCBot
Disallow: /

Fix duplicate content: Full guide

pages/products/[id].vue
<script setup lang="ts">
const route = useRoute()
useHead(() => ({
  link: [{ rel: 'canonical', href: `https://mysite.com/products/${route.params.id}` }]
}))
</script>

Redirect moved page: Full guide

nuxt.config.ts
export default defineNuxtConfig({
  routeRules: {
    '/old-url': { redirect: { to: '/new-url', statusCode: 301 } }
  }
})

When Crawler Control Matters

Most small sites don't need to optimize crawler behavior, but it matters when:

Crawl budget concerns: use Google's rough scope and your crawl evidence. A 10,000-page count alone is not a reason to block URLs. Robots.txt cannot protect private pages or guarantee deindexing.

Duplicate content: URLs like /about and /about/ compete against each other, and so do ?sort=price variations. Canonical tags consolidate these.

Staging environments: protect private staging with authentication. For public pages that should leave search results, allow crawling and use noindex. robots.txt alone does not prevent indexing.

AI training opt-out: check the provider's policy and disallow its training crawler if appropriate. A rule affects only crawlers that honor it; it does not guarantee search rankings or block malicious scraping.

Server costs: Bots consume CPU, and heavy pages (maps, infinite scroll, SSR) cost money per request. Blocking unnecessary crawlers reduces load.

Nuxt SEO Modules

Nuxt handles crawler control through dedicated modules. Install once, configure in nuxt.config.ts, and forget about it.

Was this page helpful?