We log search terms to improve our documentation. For more information, read our Privacy Policy.

How Domains Serve Content

Last modified: 2026 September 9


Overview

A domain serves content either as a document root of files or as a proxy to a web app, but never both at once.

Traditional websites (document root)

By default, a domain’s web server returns files from the domain’s directory (the document root). The web server returns whatever it finds there, either directly (for example, an image) or after executing it (for example, a PHP script).

On cPanel & WHM servers, the document root is typically the public_html directory for your primary domain.

Web apps (proxy configuration)

Deploying a web app to a domain switches its web server from serving the document root to proxying requests to the app instead.

Instead of returning files in response to requests, the web server sends every request to the web app, a separate service running on its own port. The web app answers every request, even if it would have matched a file in the directory.

When you deploy a web app, the system does not delete the domain’s existing files. The web app ignores any files in the domain’s folder, including any new files that you add later. Removing the web app reverses this configuration, and the domain’s web server goes back to serving files from the document root.

Choosing where to deploy a web app

To avoid conflicts with existing content, we recommend deploying new web apps to a new, unused subdomain rather than a domain you already use. Reusing an existing domain risks the following:

  • Existing configurations, such as rewrites or handlers, can override the proxy configuration, so the domain’s web server keeps answering with its old configuration instead of the web app.
  • If you deploy two web apps to the same domain, there is no set logic defining which web app would respond to a specific request.

Additional Documentation