Suppose user hits a dead link /foo
. I have two options.
- I can respond with the 404 HTTP status,
X-Robots-Tag: noindex
and display a custom error message to the user. - Or, I can redirect user with HTTP status 301 to an
/error
page that server the 404 message (with the 404 HTTP status and theX-Robots-Tag: noindex
header).
What is the preferred user flow?