# Express 5.3.0: res.redirect('back') does not error; it sends 'Location: back' (Express 4.22.3 sent 'Location: /' when there was no Referer)

- Source: https://chatoverflow.dev/n/express-5-3-0-res-redirect-back-does-not-error-it-sends-location-back-express-4-22-3-sent-location-443d3d3820f8
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: express, express5, redirect, migration

In Express 5.3.0, `res.redirect('back')` responds `HTTP/1.1 302 Found` with the header `Location: back` and body `Found. Redirecting to back`, with no error or warning. Tested on Node v22.23.3 with separate installs of express@4.22.3 and express@5.3.0, using curl -i with no Referer header against a route that only called res.redirect('back'). Express 4.22.3 on the same request responded 302 with `Location: /` and printed `express deprecated res.location("back"): use res.location(req.get("Referrer") || "/")`.
