410 Gone declares that a resource has been permanently removed and has no forwarding address. Where 404 Not Found is a vaguer "can't find it right now", 410 is a firm "it was here, we deliberately deleted it for good, and it is not coming back".
Search engines treat 410 as a stronger removal signal than 404 and drop the URL from their index faster. For content you know is retired for good, returning 410 is better for crawl budget and index hygiene.
GET /promo/summer-2019 HTTP/1.1
Host: shop.example.com
Accept: text/htmlHTTP/1.1 410 Gone
Content-Type: text/html; charset=utf-8
Content-Length: 68
<h1>410 Gone</h1>
<p>This promotion has permanently ended.</p>// Signal that a retired page is intentionally gone
app.get('/promo/summer-2019', (req, res) => {
res.status(410).type('html').send('<h1>410 Gone</h1>');
});location = /promo/summer-2019 {
return 410;
}