8000 fix(discover): noindex empty filtered public discovery responses by mwoods79 · Pull Request #734 · huddlz-hq/huddlz · GitHub
[go: up one dir, main page]

Skip to content

fix(discover): noindex empty filtered public discovery responses - #734

Merged
mwoods79 merged 3 commits into
mainfrom
t3/noindex-empty-discovery
Nov 30, 2026
Merged

mwoods79 merged 3 commits into
mainfrom
t3/noindex-empty-discovery

Conversation

@mwoods79
Copy link
Copy Markdown
Contributor

Summary

Direct anonymous HTTP 200 responses for filtered /discover queries that succeed with zero matching results now send X-Robots-Tag: noindex, addressing Search Console soft 404 findings (such as empty filtered huddlz and scope=groups discovery URLs) while preserving the empty-result UX.

Indexing behavior and tradeoffs

  • Response header over meta tag: X-Robots-Tag: noindex is applied on the initial 200 HTTP response via before_send from the final rendered assigns rather than a <meta name="robots"> tag in the shared root layout, so LiveView navigation never leaves a sticky noindex directive in <head> when users clear filters or move to populated pages.
  • Scope-specific narrowing filters: Only requests narrowed by filters that actually restrict the active scope opt out of indexing (q, event_type, narrowing date_filter values this_week/this_month/past, or active location for huddlz; q or active location for scope=groups).
  • Unchanged paths: Populated searches, ordinary unfiltered /discover and /discover?scope=groups (even when empty), non-narrowing variants (sort=newest, date_filter=all, blank queries, unknown params), loading defaults, failed searches, out-of-range pagination and sign-in redirects, canonical/Open Graph links, and authenticated responses stay unchanged.

Manual verification

  • Request an empty filtered discovery URL anonymously (for example /discover?q=Board+games&event_type=hybrid&date_filter=this_week or /discover?date_filter=this_month&event_type=virtual&q=Book+clubs&scope=groups) and confirm HTTP 200 with x-robots-tag: noindex, no <meta name="robots"> tag, and the self-referencing canonical link intact.
  • Confirm /discover, /discover?scope=groups, and a populated filtered search return HTTP 200 without x-robots-tag.

Search Console flagged empty filtered /discover URLs as soft 404s
because direct anonymous 200 HTML responses returned empty-result UI with
no robots directive.

Send X-Robots-Tag: noindex via a response before_send hook when a direct
anonymous 200 discovery search completes with zero matches under a
scope-appropriate narrowing filter (q, event_type, narrowing date_filter,
or active location for huddlz; q or active location for groups). Using an
HTTP response header avoids leaving a sticky robots meta tag in the
shared root layout during LiveView navigation.

Populated searches, ordinary unfiltered discovery (including when empty),
non-narrowing variants, loading defaults, failed searches, redirects,
canonical links, and authenticated views remain unchanged.
@mwoods79
mwoods79 merged commit e4be15e into main Nov 30, 2026
5 checks passed
@mwoods79
mwoods79 deleted the t3/noindex-empty-discovery branch November 30, 2026 03:18
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…vocation

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…-tokens

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…arer-token

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)

# Conflicts:
#	lib/huddlz_web/graphql_socket.ex
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…dl-links

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…mutations

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…ership

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Nov 30, 2026
…r-leave

* origin/main:
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request ABF7 Dec 1, 2026
* origin/main:
  fix(auth): have open pages follow a change of access (#735)
  fix(groups): authorize membership changes against their roster (#739)
  fix(auth): bind administrator viewing credentials to the browser session (#736)
  fix(api): authenticate API, GraphQL and MCP from the bearer alone (#729)
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
mwoods79 added a commit that referenced this pull request Dec 1, 2026
…d-sorts

* origin/main:
  fix(auth): have open pages follow a change of access (#735)
  fix(groups): authorize membership changes against their roster (#739)
  fix(auth): bind administrator viewing credentials to the browser session (#736)
  fix(api): authenticate API, GraphQL and MCP from the bearer alone (#729)
  fix(api): accept only sign-in tokens on the GraphQL socket (#730)
  fix(huddl): tie organizer-only huddl details to the current role (#726)
  fix(groups): keep a group's address book with its organizers (#725)
  fix(discover): noindex empty filtered public discovery responses (#734)
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

0