write
HTTP MOVE
WebDAV extension (RFC 4918) that moves a resource from the Request-URI to the Destination URI, equivalent to a COPY followed by a DELETE of the source. Preserves the resource across the rename or relocation.
MOVE /source HTTP/1.1 Destination: /target Properties
| Property | Value / Meaning |
|---|---|
| Safe | No - it relocates or renames the source resource. |
| Idempotent | Yes - after a successful MOVE, repeating it produces the same layout (subsequent attempts typically 404 on the source). |
| Cacheable | No - MOVE responses are not cached; caches should invalidate both URIs. |
| Has body | Optional - propertybehavior XML is allowed but rarely sent. |
| Body in response | Optional - usually 201 Created or 204 No Content; 207 Multi-Status when moving collections partially fails. |
Examples
curl -X MOVE -H 'Destination: https://dav.example.com/final/name.txt' https://dav.example.com/draft/name.txt Rename or relocate a single file.
curl -X MOVE -H 'Destination: /2026/' -H 'Depth: infinity' https://dav.example.com/2025/ Move an entire folder tree in one call.
curl -X MOVE -H 'Destination: /b.txt' -H 'Overwrite: F' https://dav.example.com/a.txt Refuse the move if b.txt already exists.
MOVE /old HTTP/1.1\nHost: dav.example.com\nDestination: /new\nOverwrite: T Raw WebDAV request replacing any existing destination.
Gotcha
For collections the Depth header must be infinity - the spec disallows Depth: 0 on MOVE with a collection. Locks on the source or destination cause 423 Locked, not 403 - handle both statuses when scripting.
Related methods
HTTP COPY
WebDAV extension (RFC 4918) that copies a resource from the Request-URI to the URI given in the Destination header. Can copy collections recursively based on the Depth header.
HTTP DELETE
Removes the target resource, or requests its removal. Once deleted, subsequent requests typically return 404 or 410.
HTTP PUT
Replaces the target resource entirely with the request payload, or creates it if it does not exist at the given URL. The client dictates the resource identifier, so PUT is idempotent.
HTTP POST
Submits an entity to the specified resource, often causing a change in state or side effect on the server. Used for creating resources, form submissions, and RPC-style calls.
HTTP PATCH
Applies a partial modification to a resource, described by the patch document in the request body (e.g. JSON Patch or JSON Merge Patch). Only the specified fields change; the rest of the resource is untouched.