201 Created without a Location header (clients can't find the new resource)
The API created a resource but doesn't say where it lives, so clients must guess or re-query.
201 without Location headerLocation header missing 201 Createdresponse.headers.get('Location') nullAccess-Control-Expose-Headers Locationcreated resource URL not returned Meaning
A 201 should carry Location: /items/42 (absolute or relative) and ideally the representation. Add the header in the create handler, and make sure the proxy doesn't strip it, so clients and HTTP libraries can follow it.
Common causes
- Create handler returns only a body
- Location header stripped by a proxy
- Wrong or relative path built from the internal host
- Framework helper not used
- CORS hiding the header from JavaScript
⚡ Quick fix
- Return
Location: /api/items/42with 201 - Expose it to browsers with
Access-Control-Expose-Headers: Location - Use the framework's
created()helper
Detailed fix by platform
Express
res.status(201).location(/api/items/${item.id}).json(item);
How to diagnose
- Location — Present?
- Exposed to CORS — Yes?
- URL — Public host?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in HTTP
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026