# werkzeug.exceptions.MethodNotAllowed: 405 Method Not Allowed: The method is not allowed for the requested URL.

- **ID:** `python/flask-405-method-not-allowed`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The route is registered for a different HTTP method (e.g. only GET) while the client sends POST/PUT/DELETE.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (96% success)
   ```
   @app.route('/submit', methods=['GET', 'POST'])
def submit(): ...
   ```
2. **** (90% success)
   ```
   @app.post('/submit')
def submit_post(): ...
   ```

## Dead Ends

- **** — CSRF produces 400/403, not 405; the route method list is the actual cause. (85% fail)
- **** — Masks the real routing mismatch and breaks clients. (80% fail)
