Skip to content

/jobs is indexed in the sitemap but redirects anonymous visitors to /auth #756

Closed

Description

@thinkclay

Found smoke-testing production, after #734 fixed the same shape for individual job pages.

sitemap-pages.xml lists:

https://scaffald.com/
https://scaffald.com/jobs        <-- gated
https://scaffald.com/support
https://scaffald.com/privacy
https://scaffald.com/terms

robots.txt allows it — the disallow list covers /dashboard, /admin, /employers, /onboarding, /settings, /messages, /notifications, /auth, but not /jobs.

Loading it signed out: the page shows a spinner and a partially-rendered signed-in shell (a drawer with "Edit profile", "Sign out", "NOTIFICATIONS"), then after roughly 40 seconds lands on /auth.

Why it matters now

#734 made individual job pages public, which was their evident intent — app/(public)/jobs/[slug].tsx with a loader, JSON-LD and a canonical URL. Those pages are now reachable and indexable.

The list they would naturally be reached from is not. A crawler is invited to /jobs, waits, and is bounced to a login wall. That is the same indexed-but-gated pattern #734 was about, one level up, and it is now inconsistent with the detail pages.

Two things to decide, and they are separable

  1. Is the jobs list public? app/(protected)/jobs/index.tsx is the signed-in search surface with filters and saved jobs. If it should be public, that is real work — a public list view, not a redirect removal. If it should stay gated, it should come out of sitemap-pages.xml and go into the robots.txt disallow list, because indexing a page nobody can read is worse than not indexing it.
  2. The 40-second delay is its own bug. Whatever the answer above, an anonymous visitor should be redirected promptly, not shown a signed-in shell and a spinner first. Rendering account chrome — including a "Sign out" item — to someone who is not signed in is wrong regardless of the routing decision.

Acceptance

  • A decision recorded on whether /jobs is public, and the sitemap and robots.txt made consistent with it
  • An anonymous visitor reaches a final state quickly, without a signed-in shell appearing first
  • If it stays gated: no sitemap entry, and a Disallow: /jobs alongside the other authenticated surfaces — noting /jobs/<slug> detail pages must stay crawlable, so the rule needs to be written carefully
  • A test that loads each sitemap-pages.xml URL without a session and asserts it does not end on /auth — the same gap that let Indexed public job pages redirect anonymous visitors to /auth #734 sit in a sitemap at priority 0.7

Related: #734 (detail pages, fixed), #732 (public profiles, fixed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions