This post is to demonstrate how to create subdomain on DigitalOcean droplet (VPS) in a few simple steps.
Step 1: Create a new A record
Go to networking section.
Create a new A Record with hostname
being ex. demo
or test.
Where redirect to
is the IP address i.e. basically the IP address of the droplet or choose a droplet.
Step 2: Create sub directory & host project files
Create a directory under /var/www/
directory using the commands in putty (optional)
cd /var/www/
mkdir subdomain_folder_name
cd subdomain_folder_name
sudo nano index.html
When you are inside the index.html
file, write anything ex. hello world.
`Hello World`
Step 3: Configure Virtual Host
Now let’s configure the apche2 virtual host, which will allow our domains to refer to a project directory.
Type in the following commands
cd /etc/apache2/sites-available/
cp 000-default.conf subdomain.website.conf
nano subdomain.website.conf
Now once you are inside the config file, change the following
#ServerName
#ServerAlias
#DocumentRoot
Here, the ServerName
is basically the domain that you want – say demo.w3make.com
, ServerAlias
is basically another name using which you want to refer this domain any CNAME in most case. DocumentRoot
is where your project files are located (Root directory of your project)
Point DocumentRoot
to the directory where your project files are located.
ex. DocumentRoot /var/www/subdomain_folder_name
ServerName demo.w3make.com
ServerAlias www.demo.w3make.com
Save the file and restart the server
sudo service apache2 restart
Now try to access your subdomain
https://demo.w3make.com
https://beuhferme.com/
https://euweedfarm.com/
https://euweedfarm.com/cali-weed-kaufen/
https://kokainhaus.com/
https://kokainhaus.com/nl/
https://kokainhaus.com/en/
https://kokainhaus.com/es/
https://kokainhaus.com/it/
https://ko-tropfen.com/
https://ko-tropfen.com/diazepam-kaufen
https://drogenplatz.com/
https://drogenplatz.com/lsd-kaufen/
https://drogenplatz.com/ecstasy-kaufen/
https://drogenplatz.com/xanax-kaufen
https://drogenpalast.com/
https://drogenpalast.com/amphetamin-kaufen/
https://drogenpalast.com/crystal-meths-kaufen/
https://pillenlabor.com/
https://pillenlabor.com/mdma-kaufen
https://hallushroom.com
https://hallushroom.com/magic-mushroom-shop
https://ketaminhaus.com