Getting a 405 Not Allowed Error – What’s Causing It and How to Fix? or Why Am I Seeing a 405 Not Allo

18 Replies, 998 Views

Ugh, 405s are the worst. Had this last month—turned out my server was rejecting POSTs due to a missing `Content-Type` header.

If you’re using fetch() or axios, make sure you’re sending headers like:

```
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
}
```

Also, try uploading a fresh .htaccess from a default WordPress install if you’re using it. Sometimes edits go sideways.

Messages In This Thread



Users browsing this thread: 1 Guest(s)