Skip to content

Instantly share code, notes, and snippets.

@darrylmorley
Last active June 21, 2024 09:49
Show Gist options
  • Save darrylmorley/c1a81b4d6561ec20258d4e45c2a0d0eb to your computer and use it in GitHub Desktop.
Save darrylmorley/c1a81b4d6561ec20258d4e45c2a0d0eb to your computer and use it in GitHub Desktop.
NextJS Robots.txt
User-agent: *
# Next.JS Crawl Budget Performance Updates
# Block files ending in .json, _buildManifest.js, _middlewareManifest.js, _ssgManifest.js, and any other JS files
Disallow: /*.json$
Disallow: /*_buildManifest.js$
Disallow: /*_middlewareManifest.js$
Disallow: /*_ssgManifest.js$
Disallow: /*.js$
Disallow: /api/
Disallow: /_next/
Disallow: /static/
Disallow: /server/
Disallow: /private/
# Optionally, you can disallow any other sensitive routes or directories
# Disallow: /admin/
# Disallow: /dashboard/
# Allow specific directories or files if necessary
Allow: /public/
# Sitemap location
Sitemap: www.yourwebsite.com
User-agent: Baiduspider
Disallow: /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment