Uh oh!
There was an error while loading. Please reload this page.
chore: block search engine indexing with noindex signals - #120
Merged
Conversation
Serve noindex, nofollow on every route via a global X-Robots-Tag header (next.config.mjs) and robots metadata in the root layout. Add src/app/robots.ts that deliberately ALLOWS crawling so search engines can fetch pages and see the noindex signals - a Disallow would leave already-indexed pages stuck in the index. Extend the CI smoke test to assert the header and /robots.txt are served.
Greptile SummaryThe PR adds site-wide crawler directives intended to remove Request Scan from search indexes while keeping pages crawlable long enough for crawlers to observe those directives.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "chore: bump version to 0.4.1" | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
The previous assertions only checked that X-Robots-Tag contained noindex and that /robots.txt returned 200, so CI stayed green if nofollow was dropped or the allow-all policy was replaced with Disallow: /. Now assert both header tokens, require a User-Agent: * group with Allow: /, and fail on any Disallow rule.
ContributorAuthor
Merge activity
|
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
We need request-scan out of Google and other search engines.
What
src/app/layout.tsx—robots: { index: false, follow: false, googleBot: { … } }in the root metadata: every route inherits<meta name="robots" content="noindex, nofollow">(covers the four"use client"routes that can't export metadata themselves).next.config.mjs— globalX-Robots-Tag: noindex, nofollowresponse header on/:path*(covers non-HTML responses a meta tag can't reach; served for real since the app runsnext start).src/app/robots.ts(new) — deliberately allow-all. To get already-indexed pages removed, crawlers must be able to fetch pages so they can see the noindex signal (Google's documented removal process). ADisallow: /would hide the noindex and leave stale entries stuck in the index. Once the site has dropped out of the index (weeks), a follow-up can flip this toDisallowto also cut crawl traffic..github/workflows/build-and-lint.yml— the smoke test now also asserts theX-Robots-Tagheader and/robots.txtare served, so de-indexing is regression-proof in CI.Notes
Verification
npm run check,npm run build,npm testgreen locallynext start:curl -sI localhost:3000/→X-Robots-Tag: noindex, nofollow;/robots.txt→ 200 allow-all; page HTML contains<meta name="robots" content="noindex, nofollow"/>