Overview
This article explains what subdomain are and how to manage them at DreamHost.
Background
A subdomain is a domain or DNS record that is added to a primary domain. For example, if your primary domain was example.com, you can add a subdomain to it named blog.example.com.
The blog part in front of the primary domain is what makes it a subdomain. This is because domains are read from right to left. In the example of blog.example.com, the three sections break down like this:
- .com — the top-level domain (TLD)
- example. — your unique domain name
- blog. — the subdomain
How to add a subdomain
There are two ways to add a subdomain at DreamHost:
- As its own hosted subdomain — This means it will be its own unique website.
- As a custom DNS record — This is only a DNS record that points away from DreamHost.
The following sections explain both methods.
Option 1 — Adding a hosted subdomain
Adding a hosted subdomain is the same as adding a primary domain. See this article for full instructions.
When you add the subdomain, it is automatically added to the Manage Websites page under the primary domain. You can then host a new website on this subdomain.
If you receive the following error message:
You can't add that domain: you must add the parent domain example.com
to your account before adding a subdomain to it.
It means that the primary domain is not yet in the system. A subdomain can only be created if its primary domain is created first (example.com). This is necessary even if you don't plan on hosting the primary domain at DreamHost.
Once the subdomain is hosted, an IP address is assigned. If your nameservers are not hosted with DreamHost, you must point your A records to this IP.
See this article for instructions on how to view the new IP address.
Option 2 — Adding a subdomain as a custom DNS record
If you are hosting the primary domain at DreamHost (example.com), but want to host the subdomain at another company (blog.example.com), you should create a Custom DNS record instead. This allows you to set the IP address of the subdomain to point to another hosting provider.
For steps that describe how to add an A Record as a custom DNS record, see this article.
Other options for your subdomain
The above examples show how to create a subdomain that is hosted at DreamHost, or points to a different hosting company. There are also a few other ways you can use a subdomain at DreamHost, which are described in the following articles:
A mirror of a DreamPress site does not work in most cases due to DreamPress caching.
Propagation time
After the domain is added, the DNS must propagate. This can take 4–6 hrs. You can use either of the following links to confirm that the DNS has updated in your location:
- whatsmydns.net — A popular site that checks DNS records around the world.
- Viewing your DreamHost DNS records — Use DreamHost's DNS propagation checker in the panel.