WebDAV overview


Web-based Distributed Authoring and Versioning (WebDAV) is an extension to the HTTP protocol which allows users to collaboratively edit and manage files on remote web servers. The World Wide Web, as conceived by Tim Berners-Lee, was always intended to be a readable and writable medium. However, as the web grew it became a largely read-only medium. WebDAV has emerged as a way to restore that functionality.

No access to your .htaccess and .htpasswd files

The instructions in this article create an .htaccess and .htpasswd files which will be owned by the server. This means you will not be able to manually edit either of these files if you need to. Additionally, these instructions will overwrite any existing .htaccess file. Make sure to backup your existing .htaccess file before beginning these steps.

If you only need to password protect your site and will need access to your .htaccess and .htpasswd file at any time in the future, you should follow the directions in the following article instead. 

These instructions walk you through how to manually create your .htaccess and .htpasswd file.


If you'd like to access your WebDAV directory over a secure connection, you must purchase an SSL certificate. Visit the following article for further details:

User access

Review the following article to learn more about accessing Webdav:

Editing files normally pre-processed by the web server

One problem with WebDAV is that it does not allow you to edit the source of server processed files, including PHP, shtml, Perl, and so on. This is because it uses the same command to "GET" the file as your web browser. The webserver has no way of knowing to not process the PHP file and give you the output instead of the source code.

Adding this line to your .htaccess file disables all processing:

SetHandler default-handler

This forces .php files to show their source, including any passwords you have coded in. You will need to change the permissions on your .htaccess file to edit it. Any changes made to this file will be overwritten if you make any changes in the panel to your htaccess/webdav options.

You could also append .txt to the end of any file to force it to read as a normal text file. For example, change test.php to test.php.txt.


WebDAV and mod_rewrite

Certain software such as WordPress and Joomla put Rewrite directives in your site’s base directory, even when installed to a subdirectory. This could possibly interfere with WebDAV access. If so, modify the base .htaccess as follows. Before each RewriteRule add:

RewriteCond %{REQUEST_URI} !/webdavdir
where webdavdir is the directory you want WebDAV access to. For multiple directories, put them in parentheses separated by pipes, like so:
RewriteCond %{REQUEST_URI} !/(webdavdir1|webdavdir2|webdavdir3)

WebDAV extensions

DreamHost's WebDAV implementation does not support extensions, such as CalDAV. You may be able to implement these features using third-party software, but DreamHost support cannot assist with any installation or configuration issues.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?