Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#21306 closed defect (bug) (wontfix)

Archived blogs should return HTTP "404 Not Found", not "410 Gone"

Reported by: amattie's profile amattie Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Multisite Keywords: has-patch
Focuses: Cc:

Description

In a multisite network, if a site is archived, ms_site_check() currently serves up a HTTP 410 status code. Here's what the HTTP spec has to say about 410:

The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.

It's acceptable to serve a 410 if the site is marked as deleted or spam, but I don't think that archiving the site is an indication that the site is permanently and irrevocably gone. Although a case can be made for changing it to 404, my contention is that a 403 is more appropriate for semantics and for bots. From the same HTTP spec:

403 Forbidden: The server understood the request, but is refusing to fulfill it.

vs

404 Not Found: The server has not found anything matching the Request-URI.

Attachments (1)

21306-0.diff (851 bytes) - added by amattie 12 years ago.
Archived blogs should respond with 403 Forbidden, not 410 Gone

Download all attachments as: .zip

Change History (5)

@amattie
12 years ago

Archived blogs should respond with 403 Forbidden, not 410 Gone

#1 @jeremyfelt
11 years ago

  • Keywords close added

Also from the HTTP spec, describing intent:

The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server's site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time -- that is left to the discretion of the server owner.

While I don't think 404 would be a bad thing in this scenario, I think 410 still makes sense. See the former Colorado governor's archived site as an example.

#2 @knutsp
11 years ago

+1 for a 403 status. It's not "gone" because "archiving" could mean the site is taken down for investigation or cleaning up unwanted content. Then it may come back online at some later time. So the intent behind doesn't need to be permanently taken offline, but could be only temporary. When marked deleted, the intent is to have it "gone" permanently.

#3 @nacin
11 years ago

In this case, "archive" does not imply, to me, "temporary". It's been a 410 for ages, and blog-suspended.php can be used to override this. Suggesting wontfix.

#4 @helen
11 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I agree that archiving is not inherently "temporary". I would also say that, as technical as HTTP status codes are, an actual person's interpretation of "forbidden" vs "gone" or "not found" also matters to some degree.

Note: See TracTickets for help on using tickets.