To display a website on the internet, you need to do two things:
- Purchase the domain registration
- Add hosting to the domain
This article assumes you've already purchased the domain registration. Below are instructions on how to add a domain to your account as 'Fully Hosted'. When a domain is 'Fully Hosted', it's set up on a web server and assigned DNS records.
How to add a 'Fully Hosted' domain
- Navigate to the (Panel > 'Domains' > 'Manage Domains') page.
- The Manage Domains page opens:
- Click the Add Hosting to a Domain / Sub-Domain button.
- The 'Manage Domains' page appears with several options to enable.
- Domain name
The first section is where you enter your domain and how it appears:
- Domain to host: enter the name of the domain or subdomain you wish to add.
- Do you want the www in your URL?: You have three options.
- Leave it alone: The www and non-www version of your site both function.
- Add WWW: This forces www to be added to your domain so when it's visited, it always appears as www.example.com
- Remove WWW: This forces www to be removed so your domain always appears as example.com
- Users, Files, and Paths
- This section allows you to choose your username and the directory where the site is installed.
- Run this domain under the user: Select a user who owns the files for this domain (you can also create a new user here. If you create a new use you can also assign it to a specific server).
- Web directory: This is the directory on the server where your site files are located. Most often there is no need to adjust this.
- Logs directory: This is just to let you know where you can find your site's logs on the server.
- Web Options
- This section allows you to choose a PHP version to run your site as well as security and optimization options.
- PHP mode: Click the dropdown menu to choose which version of PHP you wish the site to run under.
- Automatically upgrade PHP: Check this box to have DreamHost automatically upgrade the version of PHP when available. This is to prevent outdated and insecure versions of PHP from running.
- Extra Web Security?: It's recommended to keep this enabled as it provides further security to your site.
- PHP OpCache Support: This is only available on a VPS and helps to optimize PHP.
- Passenger (Ruby/Python apps only): Enable if you are running a Python or Ruby on Rails website.
- Cloudflare Services and Google Services
- This section allows you to enable different Cloudflare and Google services to your domain.
- Click the blue Fully host this domain button to save your changes.
- You'll see a green 'Success' message confirming the domain has been added. The domain is added immediately to the 'Manage Domains' page.
Pointing DNS to DreamHost
The site is now hosted on DreamHost's servers, but unless your DNS is pointed to DreamHost, it will not resolve online. View the following sections depending on where you purchased your domain registration.
If you purchased a registration with DreamHost
If you purchased the registration at another company
You would need to point your DNS to DreamHost. View the following article for details:
Adding a One-Click Install to your site
After your site is fully hosted, you can then add a One-Click Install. View the following article for further instructions:
Adding 'Account Privileges' for the domain
For information on how to allow somebody else to manage this new domain or subdomain, visit the following article:
If you get 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 second-level domain is not yet in the system. A subdomain can only be created if its second-level domain is created first (example.com) – even if you don't plan on hosting the second-level domain here at DreamHost.