Learn what to do if the DELETE, PUT, and PATCH verbs are not allowed on Plesk for Windows. Our Plesk Support team is here to help you with your questions and concerns.
DELETE, PUT, and PATCH verbs are not allowed on Plesk for Windows
If you are working with PHP files or Web APIs on a Plesk server, you may have run into the following error when using certain HTTP methods like `DELETE`, `PUT`, or `PATCH`:
405 – HTTP verb used to access this page is not allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
Today, we will examine closely why this error occurs and how to resolve it using IIS Manager and Plesk.
Why This Error Occurs
According to our Experts, this error is usually caused by a misconfiguration in IIS Handler Mappings. For instance, our HTTP method is not registered for the file type or handler associated with the application. A frequent cause is the WebDAV module, which often conflicts with handlers like PHP or .NET Core.
How to Solve the “405 – HTTP Verb Not Allowed” Error
- First, connect to the Plesk server via Remote Desktop (RDP).
- Then, go to Start > All Programs > Windows Administrative Tools and launch Internet Information Services (IIS) Manager.
- Now, expand the server node in IIS Manager.
- Then, go to Sites > example.com.
- Next, click Handler Mappings under the IIS section and find the handler associated with our application and double-click on it,
- At this point, click Request Restrictions and go to the Verbs tab.
- In the “One of the following verbs” box, enter:
GET,HEAD,POST,PUT,DELETE,PATCH
- Then, click OK to save the changes.
- However, if you get an error like this:
“The specified executable for the handler must be a .dll or .exe file.
It means the path in the Executable (optional) field contains spaces. To fix it, wrap the path in double quotes.
For example:
“C:\Program Files (x86)\Plesk\Additional\PleskPHP74\php-cgi.exe”|-d siteId=10
- It is time to remove the WebDAV Module from web.config. WebDAV can block non-standard HTTP methods. There are two ways to get this done:
- Via IIS (Optional)
We can add the following directly through the web.config or IIS:
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer> - Via Plesk File Manager
- Log in to Plesk.
- Then, go to Domains > example.com > File Manager.
- Open the `web.config` file. Before editing it, it’s always a good idea to create a backup in case anything goes wrong.
- Locate the <system.webServer> section.
- Add the following inside it:
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>If the <modules> or <handlers> section already exists, insert the <remove> lines within the respective blocks.
- Save the file and exit.
- Via IIS (Optional)
Working with virtual environments? Our guide on booting Windows from a physical disk in KVM might be relevant if you manage Windows-based VMs in parallel.
After saving your changes, restart the IIS site or refresh the application. Then, try again using the `DELETE`, `PUT`, or `PATCH` methods to confirm that the issue is resolved.
Encountering strange Windows errors like 0x80004005? Learn how to fix the 0x80004005 error in Windows 11 for a smoother troubleshooting experience.
[Need assistance with a different issue? Our team is available 24/7.]
Conclusion
The “405 – HTTP verb not allowed” error is usually caused by restrictive handler configurations or conflicts with the WebDAV module. By updating the handler settings and modifying the web.config file, we can enable full support for modern HTTP methods in the PHP or Web API applications hosted on Plesk.
In brief, our Support Experts demonstrated what to do if DELETE, PUT, and PATCH verbs are not allowed on Plesk for Windows.