Skip to content

fix: stop private squads and gated pages from being indexable#6322

Merged
idoshamun merged 2 commits into
mainfrom
eng-1862-private-squads-still-have-follow-index-properties-which-is
Jul 14, 2026
Merged

fix: stop private squads and gated pages from being indexable#6322
idoshamun merged 2 commits into
mainfrom
eng-1862-private-squads-still-have-follow-index-properties-which-is

Conversation

@idoshamun

@idoshamun idoshamun commented Jul 14, 2026

Copy link
Copy Markdown
Member

What

Private squads (and other auth-gated pages) were emitting index, follow despite the squad page already setting noindex/nofollow.

Root cause

defaultSeo injected a global robots tag via additionalMetaTags. next-seo keys those by meta name, not key="robots", so next/head never deduped it against the page-level native robots tag. Every noindex page therefore rendered two robots tags — the correct noindex,nofollow and a stray index, follow, max-snippet… — and the stray one won in practice.

Changes

  • Migrate robots off additionalMetaTags onto next-seo's first-class handling: add a shared robotsProps (the max-* directives) and pass it to both DefaultSeo and the page-level NextSeo in _app.tsx. Now exactly one robots tag is emitted per page and page-level noindex always wins.
  • Add a shared noindexSeoProps constant and spread it into the seo of auth-gated / crawler-inaccessible pages: following, all settings/**, bookmarks/**, my-feed, squads/discover/my, feeds/[slugOrId]/edit, and team/** feedback.
  • Regression tests: single robots tag + max-* survival (via HeadManagerContext to exercise the real next/head dedupe), squad GSSP noindex flags, and a gated-page seo lock.

Key decisions

  • noindex stays per-page (via _app's server-rendered NextSeo), not in SettingsLayout. A single NextSeo in the shared layout looked tempting, but SettingsLayout returns null/an auth wall for unauthenticated requests and settings pages have no getServerSideProps — so during SSR (what crawlers receive) it wouldn't render, dropping noindex from the initial HTML.
  • Public pages untouched (feeds, sources, tags, posts, public squads, public profiles) so they stay index,follow with the max-* directives byte-preserved.
  • Kept a small null → undefined coercion in team/feedback.tsx required by the strict typecheck guard once the file entered scope.

Closes ENG-1862


Created by Huginn 🐦‍⬛

Preview domain

https://eng-1862-private-squads-still-ha.preview.app.daily.dev

idoshamun and others added 2 commits July 14, 2026 15:47
The global `additionalMetaTags` robots entry in `defaultSeo` was keyed by
meta name rather than `key="robots"`, so it escaped next/head's dedupe and
overrode every page's noindex with a stray `index, follow` tag — private
squads still emitted `index, follow` despite the page setting noindex.

- Move robots directives off `additionalMetaTags` onto next-seo's
  first-class handling: add a shared `robotsProps` (max-* directives) and
  pass it to both `DefaultSeo` and the page-level `NextSeo` in `_app.tsx`,
  so exactly one `robots` tag is emitted per page and page-level noindex
  always wins.
- Add a shared `noindexSeoProps` constant and apply it to auth-gated /
  crawler-inaccessible pages (following, settings/**, bookmarks/**,
  my-feed, squads/discover/my, feed edit, team feedback) so they emit
  noindex,nofollow.
- Add regression tests for the single robots tag / max-* survival, the
  squad GSSP noindex flags, and the gated-page seo lock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jul 14, 2026 3:55pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Jul 14, 2026 3:55pm

Request Review

@idoshamun idoshamun merged commit 82f6a7c into main Jul 14, 2026
11 checks passed
@idoshamun idoshamun deleted the eng-1862-private-squads-still-have-follow-index-properties-which-is branch July 14, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant