Narrative: HTTP 421 and the Host header.
// problem · 18 june 2026 · 1 min
HTTP 421 Misdirected Request caused by an incorrect Host header
A 421 that looked like Nginx until the outbound Host header showed up.
Time wasted: 2 hours
Problem
Environment
Symptoms
Expected
Investigation
Things I tried
Root cause
Solution
Why it worked
Lesson
Found something wrong?
These notes can be incomplete, or wrong in a different environment. Suggest a correction on GitHub or email me at me@t4mer.net.
// related
// article
HTTP 421 and the Host header I should not have set
Yesterday I had a request that worked in Postman and failed from Laravel with HTTP 421. The problem was one header I should not have been setting manually.
// problem
API works in Postman but fails in Laravel
The request you think you are sending is not always the request that leaves the process.
// problem
Laravel authentication error returning HTML instead of JSON
The API client expected JSON. Laravel thought it was talking to a browser.