HTTP: 405 Method Not Allowed
Last verified
405 Method Not AllowedWhat it means
405 means the URL exists, but not for the HTTP method you used. RFC 9110 requires the server to send an Allow header listing the methods it does accept, for example Allow: GET, HEAD.
In automation this usually appears when a script sends GET to an endpoint the site's front end calls with POST (search forms and GraphQL endpoints are common), or POSTs to a page that only accepts GET. Some servers also answer HEAD requests with 405, which breaks link checkers that use HEAD to save bandwidth.
What is not wrong: your credentials and the URL path. Only the method, and often the body format that goes with it, needs to change.
What it looks like
HTTP/1.1 405 Method Not Allowed
Allow: POST
requests.post(url, json={"query": "shoes"}, timeout=30)Why it happens
- Sending GET to a search or API endpoint that requires POST with a JSON or form body.
- Sending POST to a static page or a route that only serves GET.
- A link checker using HEAD against a server that does not implement it.
- A redirect from HTTP to HTTPS that changed POST to GET along the way (301/302 behavior).
How to fix it
- Read the Allow header on the 405 response to see the accepted methods.
- Check the API documentation, or the network tab of your own browser session, to see which method and body the endpoint expects.
- Send the body in the documented format and Content-Type (application/json vs form-urlencoded).
- Call the final HTTPS URL directly so redirects do not rewrite the method.
- For link checking, fall back from HEAD to GET when you get 405.
How to stop it recurring
Use documented APIs and record the method, URL and body for each endpoint you call. Avoid relying on 301/302 redirects for non-GET requests; target the canonical URL directly.
Official documentation: developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/405. See all HTTP error messages.
Related errors
Definitions
- CAPTCHACAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a challenge-response m
- Cloudflare Bot ManagementCloudflare Bot Management is the set of Cloudflare features (Bot Fight Mode, Super Bot Fight Mode and the Ente
- DataDomeDataDome is a commercial bot-protection service that scores every request to a website, app or API in real tim
- HUMAN Security (PerimeterX)PerimeterX, now HUMAN Security's Bot Defender after a 2022 merger, is a bot-protection service that scores eve
- User AgentA user agent is a string that browsers send with every HTTP request identifying the browser type, version, and
- AI Web ScraperAn AI web scraper is an AI-powered data extraction tool that understands page structure, identifies relevant d
- Data ScrapingData scraping is the broad practice of programmatically extracting data from any digital source — websites, ap
- Web CrawlerA web crawler (also called a spider or bot) is a program that systematically browses the internet by following
Quick answers
What does "405 Method Not Allowed" mean in HTTP?
405 means the URL exists, but not for the HTTP method you used. RFC 9110 requires the server to send an Allow header listing the methods it does accept, for example Allow: GET, HEAD . In automation this usually appears when a script sends GET to an endpoint the site's front end calls with POST (search forms and GraphQL endpoints are common), or POSTs to a page that only accepts GET.
How do I fix "405 Method Not Allowed"?
1. Read the Allow header on the 405 response to see the accepted methods. 2. Check the API documentation, or the network tab of your own browser session, to see which method and body the endpoint expects. 3. Send the body in the documented format and Content-Type (application/json vs form-urlencoded). 4. Call the final HTTPS URL directly so redirects do not rewrite the method. 5. For link checking, fall back from HEAD to GET when you get 405.
Retries and timeouts without writing the loop
Autonoly's HTTP Request node and browser steps have per-node retries, timeouts and continue-on-fail, so a transient 429 or 503 can back off instead of failing the run. It has no proxies or IP rotation: if a site blocks automated traffic, that block applies to Autonoly too.
Also see Error handling in workflows.