451 🌐 HTTP

HTTP 451 Unavailable For Legal Reasons

The content is blocked for legal reasons — a court order, government censorship, sanctions, or GDPR geo-blocking.

Seen on: REST API

Meaning

451 (a nod to Fahrenheit 451) tells users the block is legal, not technical. Sites return it for regions they can’t serve (e.g. EU visitors under GDPR), and ISPs or platforms return it for court-ordered takedowns. GitHub uses it for DMCA-blocked repositories.

Common causes

  • Site geo-blocks your country/region (GDPR, sanctions)
  • Court order or DMCA takedown
  • ISP/government blocking
  • Your own app’s compliance rule

⚡ Quick fix

  1. Check whether the block is regional and lawful to bypass — respect the law
  2. Contact the site for an alternative
  3. If it’s your service, explain the reason and the legal authority in the body

Detailed fix by platform

Nginx

  1. nginx
    # returning 451 for a blocked region (with GeoIP)
    if ($geoip2_country_code = "XX") { return 451; }

How to diagnose

  1. Region — Does it happen from every location?
  2. Body — Does it name the legal authority?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.