405 Method Not Allowed

405 Method Not Allowed should be returned by a server when a certain HTTP method is not supported at a resource.

It’s a bit different from 403 Forbidden. 403 suggest that the server might support the HTTP request, but the client doesn’t have the right privileges to do the HTTP request.

405 Method Not Allowed means that the HTTP method is simply not supported. For example, a client might do a POST request on a resource where POST is not implemented or it’s meaningless.

A server generating the 405 response must also tell the client which HTTP methods it can do, using the Allow header.


HTTP/1.1 405 Method Not Allowed
Content-Type: text/html

<h1>405 Try another method!</h1>

Well, the next couple of weeks are going to be pretty quiet on the web, so I’m taking a short break of these series and see you back January 8th!


HTTP series

This article is part of a series about the HTTP protocol. Read them all here:

Informational 1xx

Successful 2xx

Redirection 3xx

Client Error 4xx

Server Error 5xx

Web mentions