---
title: "Creating a subdomain"
date: "2015-03-17"
category: "web-content"
slug: "creating-subdomain"
---

## Overview

A subdomain is an extension of your primary domain or an [[creating-addon-domain]] that can serve as both an [[authorizing-hostnames-handle-e-mail]] endpoint and a [[where-is-site-content-served-from]].

## Creating a Subdomain

Subdomains are managed in the [[logging-into-the-control-panel]] under **Web** > **Subdomains**.

### Configuration Parameters

**Subdomain Name**

- **Standard subdomain:** A basic subdomain name, e.g. "kb" creates `kb.example.com`.
- **Fall-through subdomain:** Serves content only when no other subdomain matches. This is useful for WordPress [multisite](http://codex.wordpress.org/Create_A_Network) setups where multiple subdomains (e.g. `sports.myblog.com`, `people.myblog.com`, `finance.myblog.com`) are all served from one location. Any explicitly defined subdomain takes precedence and serves content from its own [[where-is-site-content-served-from]].

**Subdomain Affinity**

Creates the subdomain on one or more domains. DNS records are automatically created for these domains when using [[nameserver-settings]].

**Document Root**

The location from which the subdomain's web content is [[where-is-site-content-served-from]]. Multiple subdomains can share the same document root.

### The www Exception

Any subdomain name is valid except names beginning with `-` or `_`, and `www`, which is reserved as an alias for the parent domain.

### Placeholder File

When a subdomain is created, a basic `index.html` placeholder is placed in the document root directory. Remove or replace this file to deploy your application. This step is required before running [[passenger-supported-apps]] or PHP applications like WordPress or Drupal.

## Setting DNS with Third-Party Nameservers

If you use third-party nameservers instead of [[nameserver-settings]], you are responsible for creating DNS records for the subdomain. Add the following records with your DNS provider:

```
<subdomain>     IN A <IP address>
www.<subdomain> IN A <IP address>
```
