Bring back the 404
Lately, more sites are choosing to return a 301
where a 404
would have been more appropriate.
The unfortunate user who clicks links to pages on these sites finds themselves looking at a page they didn’t expect without any explanation.
Who thought this was a good idea? Does Google’s ranking algorithm somehow encourage this misbehavior? The author of one wordpress plugin claims “you should take steps to avoid 404 errors as it affects your S.E.O. badly.” S.E.O. lore is such a cesspool that there’s no way to know whether that is true, but Google has adopted this malpractice on some of its own sites so there may be some truth to it.
Firefox has a setting — network.http.redirection-limit
— which can be used to disable redirects entirely if set to 0
, but it probably breaks some legitimate uses. In older versions of Firefox it was possible to prevent automatic redirects and there was an add-on to help manage this. Unfortunately, this approach is incompatible with the current version of Firefox.
Here are some examples of inappropriate redirects:
From | To |
---|---|
http://www.joystiq.com/2012/03/06/one-reason-fez-has-taken-five-years-to-make-has-already-won-awa/ | https://www.engadget.com/gaming/ |
https://store.google.c-om/us/product/pixel_5 | https://store.google.com/us/category/phones?hl=en-US |
http://www.gamasutra.com/view/news/185894/Its_official_XNA_is_dead.php | https://www.gamedeveloper.com/latest-news |
https://www.linksys.com/support-article?articleNum=198576 | https://support.linksys.com/home/ |
Example requests and responses:
GET /us/product/pixel_5 HTTP/2
Host: store.google.com
User-Agent: curl/8.6.0
Accept: */*
HTTP/2 301
content-type: application/binary
vary: Sec-Fetch-Dest, Sec-Fetch-Mode, Sec-Fetch-Site
cache-control: no-cache, no-store, max-age=0, must-revalidate
pragma: no-cache
expires: Mon, 01 Jan 1990 00:00:00 GMT
date: Thu, 27 Feb 2025 14:58:18 GMT
location: https://store.google.com/us/product/pixel_5?hl=en-US
GET /support-article?articleNum=198576 HTTP/2
Host: www.linksys.com
User-Agent: curl/8.6.0
Accept: */*
HTTP/2 301
date: Thu, 27 Feb 2025 15:02:18 GMT
content-type: text/html
content-length: 167
location: https://support.linksys.com/home/
GET /2012/03/06/one-reason-fez-has-taken-five-years-to-make-has-already-won-awa/ HTTP/1.1
Host: www.joystiq.com
User-Agent: curl/8.6.0
Accept: */*
HTTP/1.1 301 Moved Permanently
Date: Thu, 27 Feb 2025 15:03:42 GMT
Connection: keep-alive
Server: ATS
Cache-Control: no-store
Content-Type: text/html
Content-Language: en
X-Frame-Options: DENY
Location: https://www.engadget.com/gaming/