Learn how to create a Subdomain in DigitalOcean like a pro with a little help from our experts. Our DigitalOcean Support Services specializes in resolving issues, big and small.
How to create a Subdomain in DigitalOcean
If you are struggling with creating subdomains, our experts are here to lend a hand. Before we begin, here are the requirements before we begin:
- Configured DigitalOcean Droplet or VPS with Name Server records
Steps to create a subdomain in DigitalOcean
Our in-house experts have put together this step-by-step guide to help you create a subdomain.
- First, we have to connect to the DigitalOcean Droplet or VPS with SSH command.
- Then head to the networking section of DigitalOcean or the DNS management console. Next, we have to create a new A record.
Additionally, add the IP address of the droplet in the “Will Direct To” field.
- Next, we have to create a directory under the /var/www/ as seen below:
cd /var/www/
mkdir subdomain
cd subdomain
sudo nano index.html - Next, we have to configure the virtual host in order for the domains to refer to a project directory.
cd /etc/apache2/sites-available/
cp 000-default.conf subdomain.website.conf
nano subdomain.website.conf - After that, we have to change the ServerName, ServerAlias, and Document Root in the config file.
- Server Name: the domain that we want
- Server Alias: Another name to refer to the domain
- DocumentRoot: points to the location of the project files.
- Then, save the config file and restart the server to finalize adding the subdomain.
sudo service apache2 restart
- Now, we will be able to access our subdomain without any trouble.
With the above steps, creating a subdomain is an easy task. If you run into any trouble contact our in-house team for further support.
[Need assistance with a different issue? Our team is available 24/7.]
Conclusion
In conclusion, our skilled Engineers showed us how to create a subdomain in DigitalOcean. This step-by-step guide gave us a quick glimpse at creating a subdomain in DO without too much trouble.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments