Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix!: deprecate disallowNonIndexableRoutes #173

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

harlan-zw
Copy link
Contributor

@harlan-zw harlan-zw commented Dec 17, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The disallowNonIndexableRoutes config adds any ignored routes within your routeRules to /robots.txt.

export default defineNuxtConfig({
  routeRules: {
    '/secret/**': { robots: false },
  }
})
# /robots.txt
Disallow: /secret/

This feature is inherently broken as robot meta tags (or X-Robots-Header) and robots.txt are for different controls.
We can't automatically infer one from the other, for more context see Controlling Web Crawlers but tldr; we may want robots to still visit a page but not index it.

This PR changes the default behavior to false for this config and sets it to deprecated. While this is marked as a breaking change, this should have no effect on your end SEO as the page will still be disabled from indexing

@harlan-zw harlan-zw changed the title fix!: deprecate disallowNonIndexableRoutes fix!: deprecate disallowNonIndexableRoutes Dec 17, 2024
@harlan-zw harlan-zw merged commit 539285a into main Dec 17, 2024
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant