Site AI Auditby Internet Solutions

Unsafe HTTP Methods: Why TRACE, PUT and DELETE Should Be Off

8 ตุลาคม 2026อ่าน 8 นาทีความปลอดภัยและ SSL
Unsafe HTTP Methods: Why TRACE, PUT and DELETE Should Be Off

Short answer: A normal website needs only a few HTTP methods: GET, HEAD and POST, plus OPTIONS for some cross-origin requests. Methods such as TRACE, PUT, DELETE and the WebDAV extensions should be disabled unless an application on the server really uses them and protects them with authentication. You can test your site with a single command, and you can turn the extra methods off in Apache, Nginx or your CDN in a few lines, without affecting visitors.

What HTTP methods are

Every request a browser sends starts with a method, a verb that tells the server what the client wants to do. When you open a page, the browser sends GET /page/. When you submit a contact form, it usually sends POST. The method is followed by the path and the headers, and the server decides how to respond.

The HTTP standard defines several methods, and extensions add more:

Whether these methods do anything depends on the server software and its modules. On many servers they simply return an error. The risk comes from servers where a module or an old configuration quietly accepts them.

Why extra methods are a risk

PUT and WebDAV can allow file uploads. If WebDAV is enabled on a directory without proper authentication, anyone can upload a file, including a script that the server then executes. This is one of the oldest ways web servers get taken over, and it still turns up on forgotten test servers, old hosting panels and misconfigured storage directories.

DELETE can remove content. Where a server or application maps DELETE to files without checking permissions, an attacker can delete pages or uploaded documents.

TRACE can leak headers. Because TRACE echoes the request, it was historically abused in “cross-site tracing” attacks to read cookies that were meant to be hidden from scripts. Modern browsers no longer let pages send TRACE requests, so this specific attack is largely history, but an enabled TRACE method still reveals headers added by proxies and load balancers, and security scanners flag it for good reason.

OPTIONS and the Allow header reveal information. A response that lists every method the server accepts tells an attacker exactly which doors are worth trying. OPTIONS itself is needed for CORS, so the aim is not to block it everywhere but to make sure it reveals only methods you actually support.

Taken together, extra methods widen the attack surface without giving a normal website anything in return. They belong to the same family of problems as directory listing and exposed backup files: leftovers that nobody uses but anybody can find.

How to test which methods your site accepts

You can check from any computer with curl. Replace the address with your own and test both the home page and a directory such as your uploads folder:

Keep in mind that a CDN or firewall in front of your site may answer differently from the origin server. If you can reach the origin directly, test both. Only test servers you own or are allowed to test.

When PUT, PATCH and DELETE are legitimate

Before you block everything, check what your applications need. REST APIs routinely use PUT, PATCH and DELETE. The WordPress REST API, for example, accepts them on /wp-json/ routes for logged-in users and applications, and the block editor relies on it. Headless shops, mobile app back ends and single-page applications do the same.

The difference is where the method is handled. In a healthy setup, the application receives the request, checks authentication and permissions, and then acts. The danger is a web server module that handles PUT or DELETE directly on the file system, before any application code runs. So the rule of thumb is: let the application handle these methods on its API paths, and make sure the web server itself never maps them to files.

How to disable unsafe methods on Apache

On Apache, TRACE is controlled by a single directive in the main server configuration:

On shared hosting you may not have access to the main configuration. In that case ask your host to confirm that TRACE and WebDAV are disabled, or use the hosting panel’s security settings.

How to disable unsafe methods on Nginx and CDNs

Nginx does not support TRACE or WebDAV unless the DAV module is compiled in and enabled with dav_methods, so the main task is to make sure no such directive exists. To be explicit, you can allow only the methods you need:

Most CDNs and web application firewalls let you block methods with a rule as well. That is a useful extra layer, but fix the origin too: attackers sometimes find the origin’s IP address and bypass the CDN entirely. Our guide on web application firewalls explains what such rules can and cannot do.

Other hardening that goes with it

Disabling unused methods is one part of reducing what your server reveals and accepts. While you are in the configuration, check the related items:

Retest with the curl commands after every change, and once more after server updates, because a control panel update can reset configuration files.

How Site AI Audit helps

Site AI Audit looks at your website from the outside, the way visitors and search engines see it. On the security side it checks the SSL certificate and its expiry, the HTTP to HTTPS redirect, security headers such as HSTS, X-Content-Type-Options and frame protection, mixed content and whether the server or WordPress reveals its version. It does not send PUT, DELETE or TRACE requests to your server, so use the commands above for that test. You can run a free check to see the other findings, and the pricing page lists the plans with re-checks and monitoring.

Related reading

The bottom line

Most websites need only GET, HEAD, POST and OPTIONS from the web server itself. TRACE, WebDAV and file-level PUT or DELETE add risk and nothing else. Test your site with curl, disable what you do not use in Apache, Nginx or your CDN, leave API methods to applications that check permissions, and repeat the test after updates. It is a small change that closes an old but still real way into a server.

FAQ

Is an enabled TRACE method still dangerous?

The classic cross-site tracing attack no longer works in modern browsers, but TRACE can still reveal internal headers and is flagged by security scanners. There is no reason to keep it enabled on a production website.

Will blocking PUT and DELETE break WordPress?

It can if you block them for the REST API, which the block editor and some plugins use. Allow them on /wp-json/ paths and block them elsewhere, so the application keeps checking permissions itself.

Should I block the OPTIONS method?

Usually not. Browsers send OPTIONS for CORS preflight requests. Make sure the response lists only methods you really support and does not reveal more than needed.

What status code should a blocked method return?

405 Method Not Allowed is the most accurate. 403 Forbidden or 501 Not Implemented are also acceptable, as long as the method is not executed.

Is WebDAV ever safe to use?

Yes, on a dedicated location with strong authentication over HTTPS and no script execution. It should never be enabled on the public document root of a website.

#Security headers#Web vulnerabilities#Website security
ตรวจเว็บไซต์ของคุณเอง — ฟรีเว็บไซต์ของคุณต้องแก้อะไร — และควรเริ่มตรงไหน
เริ่มใช้ฟรี

เพิ่มเติมจากบล็อก

บทความทั้งหมด →
Internet Solutions

ผลงานอื่นจากทีมเรา

สร้างโดย Internet Solutions ลองผลิตภัณฑ์อื่น ๆ ของเรา — แต่ละตัวช่วยประหยัดเวลาให้คุณในแบบที่ต่างกัน

internet-solutions.net ↗
01โพสต์โซเชียลมีเดียอัตโนมัติ
PostRSS

โพสต์ใหม่จากฟีด RSS ของคุณจะถูกส่งไปยัง Facebook, X, LinkedIn, Telegram และอีก 60+ เครือข่ายโดยอัตโนมัติ

แพ็กเกจฟรี · ตั้งแต่ 2014เยี่ยมชม →
02แชทสด AI สำหรับเว็บไซต์
Talkmio

เว็บไซต์ของคุณตอบผู้เยี่ยมชมตลอด 24/7 จากเนื้อหาของคุณเอง ในภาษาของพวกเขา

แพ็กเกจฟรี · ไม่ต้องใช้บัตรเยี่ยมชม →
03ผู้ช่วย AI
Ask Mio

แชท เขียนโค้ด ออกแบบ เขียนงาน และค้นคว้า Mio เลือกโมเดลที่ดีที่สุดให้แต่ละงาน

แพ็กเกจฟรีเยี่ยมชม →
04ออโต้ไพลอต AI สำหรับบล็อกและโซเชียล
AI Blog Autopilot

AI เขียนบทความ SEO ยาว 2,000–3,000 คำ และแชร์แต่ละบทความไปยังโซเชียลเน็ตเวิร์ก 58+ แห่ง

3 บทความแรกฟรีเยี่ยมชม →
05ครอว์ล SEO เชิงลึก
Site SEO AI Audit

ครอว์ล SEO เต็มรูปแบบใน 7 ด้าน รวมถึงการมองเห็นในการค้นหาด้วย AI พร้อมวิธีแก้ที่เรียงตามผลกระทบ

ตรวจครั้งแรกฟรีเยี่ยมชม →
06ฟีด RSS และฟีดสินค้า
RSS Feed Creator

สร้าง RSS จากหน้าเว็บใดก็ได้ พร้อมฟีดสินค้าสำหรับ Google และ Meta ที่อัปเดตตัวเองได้

แพ็กเกจฟรีเยี่ยมชม →
07พัฒนาเว็บไซต์และ SEO
Internet Solutions

เว็บไซต์ ร้านค้าออนไลน์ และระบบเฉพาะทาง ออกแบบ สร้าง และดูแลโดยทีมของเรา

ตั้งแต่ 2011เยี่ยมชม →
Site AI Audit
ภาพรวมความเป็นส่วนตัว

เว็บไซต์นี้ใช้คุกกี้เพื่อมอบประสบการณ์การใช้งานที่ดีที่สุด ข้อมูลคุกกี้จะถูกเก็บในเบราว์เซอร์ของคุณ และทำหน้าที่ต่างๆ เช่น จดจำคุณเมื่อกลับมาที่เว็บไซต์ และช่วยให้ทีมของเราเข้าใจว่าส่วนใดของเว็บไซต์ที่คุณสนใจและเป็นประโยชน์มากที่สุด