home / website errors / 405-method-not-allowed

[ REPAIR GUIDE ] WEBSITE ERRORS

How to fix 405 Method Not Allowed

ERROR DETECTED >405 Method Not Allowed

UPDATED NOVEMBER 20263 MIN READ8 FIXES

QUICK FIX

As a visitor, go back to the site's home page and repeat the action from there instead of refreshing or using the back button. As a site owner, check which methods the URL allows and whether a server rule, firewall or security plugin is blocking the method.

What it means

A 405 Method Not Allowed error means the server understood the type of request, such as loading a page (GET) or sending a form (POST), but that page does not accept that type. For visitors it often appears after resending a form or following an old link. In most cases it is the website's setup that needs fixing, not your device.

Common causes

  • A form sent to a page or URL that only accepts normal page loads
  • Reloading or going back to a page that was the result of a form
  • A web server or app route not set up for that method
  • A firewall or security plugin blocking POST, PUT or DELETE requests
  • On IIS, a module or handler mapping intercepting the method
  • Incorrect file or folder permissions on the server

How to fix it

Work down the list. Each fix is safe to try before moving on to the next.

FIX 01Start again from the home pageEASY

  1. Click into the address bar and remove everything after the domain name, then press Enter.
  2. Navigate to the page or form again using the site's own menus.
  3. Fill in and submit the form once, without refreshing or pressing back.

Why it helps: Refreshing or going back after a form can resend a request type the page does not accept.

FIX 02Check the link you usedEASY

  1. If you came from a bookmark or an old email, look for an updated link on the site.
  2. Check the address for typos or extra parts such as a trailing file name.

Why it helps: An outdated URL can point at something that only accepts certain kinds of requests.

FIX 03Clear the site's cookies and try a private windowEASY

  1. In Chrome, go to the three-dot menu, then Settings > Privacy and security > Third-party cookies > See all site data and permissions.
  2. Search for the site, click the trash icon and confirm with Delete.
  3. Or test first in an Incognito window with Ctrl + Shift + N on Windows or Command + Shift + N on a Mac.

Why it helps: A stale session can send you to the wrong step of a sign-in or checkout flow.

FIX 04Contact the websiteEASY

  1. If the same action fails from a fresh start and in another browser, contact the site's support.
  2. Tell them the page address, what you clicked and the time.

Why it helps: If a normal action triggers a 405, the site's configuration needs fixing.

// RUN THIS SITE? FIXES FOR SITE OWNERS

FIX 05Check which methods the URL allowsMEDIUMSITE OWNERS

  1. Open the browser's developer tools, go to the Network tab and repeat the failing action.
  2. Click the failed request and note the Request Method and the Allow response header, which lists the methods the server accepts.
  3. Check the form's action address and method in your HTML, or the call in your JavaScript, and make sure they point to an endpoint that accepts that method.
  4. In your app or framework, confirm a route exists for that URL and method.

Why it helps: A 405 means the method and the URL do not match; this shows exactly which side is wrong.

FIX 06Review server rules and security toolsMEDIUMSITE OWNERS

  1. Check .htaccess or your Nginx config for rules that limit methods, and undo recent changes.
  2. On Nginx, a POST sent to a static file location is answered with 405; route it to your app or PHP handler instead.
  3. Check your firewall, CDN rules and WordPress security plugins for blocks on POST, PUT or DELETE, and temporarily disable the security plugin to test, then turn it back on.
  4. Check the server error and access logs for the request.

Why it helps: A rule at any layer can reject a method before your app sees it.

FIX 07Fix IIS handler and module settingsADVANCEDSITE OWNERS

  1. Back up web.config before editing.
  2. In IIS Manager, open the site's Handler Mappings, double-click the handler for your app, click Request Restrictions and check the Verbs tab allows the method.
  3. Remember that a POST sent to a plain static file (handled by StaticFile) always fails; send it to a page your app handles instead.
  4. If PUT or DELETE fail and your site does not use WebDAV, remove the WebDAV module and handler in web.config, or turn off the WebDAV Publishing feature in Windows.

Why it helps: IIS returns 405 when a handler does not accept the method or when WebDAV intercepts PUT requests.

FIX 08Check file and folder permissionsADVANCEDSITE OWNERS

  1. Make sure the web server user can read the files and run the scripts that handle the request.
  2. On most Linux hosts, use 755 for folders and 644 for files, and avoid making everything writable.

Why it helps: MDN notes that wrong permissions can also produce a 405.

Check it's fixed

  • The form or action completes without an error.
  • In developer tools, the request returns a 2xx or expected status instead of 405.
  • The same action works in a private window.

When to get help

Visitors should contact the site if starting fresh does not help. Site owners who cannot find the blocking rule should ask their host or developer, sharing the URL, method and time of the request.

Questions

What does "method" mean here?

It is the type of request the browser sends: GET to load a page, POST to send a form, and others like PUT or DELETE used by apps.

Is 405 the same as 404?

No. A 404 means the page was not found. A 405 means the page exists but does not accept that kind of request.

Can I fix a 405 on someone else's website?

Only by starting the action again from a fresh page. If it still fails, the site owner has to fix it.

Related fixes

Still stuck?

Paste the exact message and the repair bot will find the closest fix, or search it on Google, Microsoft, Apple, Reddit and YouTube.

Sources