WhereGoes

401 Unauthorized

4xx client error

The request lacks valid authentication credentials, so the client must send a valid Authorization header after consulting the WWW-Authenticate challenge.

Common causes

  • No Authorization header was sent to a protected route.
  • The token or session expired or was revoked.
  • The credentials are structurally wrong, such as a malformed bearer token.

How to fix it

  • Send a WWW-Authenticate header naming the expected scheme.
  • Refresh or reissue the token and retry with valid credentials.
  • Separate authenticated API hosts from public page hosts to keep bot access clear.

What it means for redirects and SEO

Protected URLs are indexed only if crawlers can authenticate or the challenge does not block them. The WWW-Authenticate header tells bots what scheme is expected. Guests hitting 401 on public pages is a hard crawl blocker.

Related codes