← Back to all status codes
4xx Series
Safe to retry

401 Unauthorized

Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.

🌍

SEO Impact

Pages returning 401 are dropped from search indexes natively. Ensure no public content requires authentication.

🔧

Common Causes

  • 1Expired JWT token
  • 2Missing Authorization header
  • 3Incorrect password

Code Examples

Python (Django)
return HttpResponse('Unauthorized', status=401)

Related Codes