Follow the steps given below to add a domain without a control panel on the server.

First, add the user on server.

useradd hostdens

Then go to the home folder and search the user.

cd /home/

ls -ld hostdens

Then go to the user by giving the below command.

cd hostdens

Create the public_html folder under that user.

mkdir public_html

Provide proper ownership and permission to public_html folder.

chown hostdens. public_html

chmod 750 public_html

Now, add manual entries of virtual host at the end of httpd.conf. Before that take the copy of httpd.conf

cd /etc/httpd/conf/

cp httpd.conf httpd.conf-bak

vi /etc/httpd.conf

DocumentRoot /home/hostdens/public_html
ErrorLog logs/
CustomLog logs/ common

change the document root path, server name, error logs and custom logs
save the files and restart the apache. First, check the apache syntax is correct.

httpd -t

/etc/init.d/httpd restart

Then create the DNS entry of the domain

Go to named path

cd /var/named/

Copy the entry of another domain



Open that file now.


Accept name server replace the domain name with your main domain name.

$TTL 14400 86400 IN SOA (
2010020703 ;Serial Number
86400 ;refresh
7200 ;retry
3600000 ;expire
86400 ;minimum
) 86400 IN NS 86400 IN NS 14400 IN A 14400 IN MX 0
mail 14400 IN CNAME
www 14400 IN CNAME
ftp 14400 IN A

save and quit the file.

Open named.conf file and the entery of that domain, First create the backup file of named.conf

cd /etc/

cp named.con named.conf-bak

vi /etc/named.conf

Copy the entry of another domain and replace the other domain with your domain name.

zone “” {
type master;
notify no;
file “”;


Once done then restart the named service.

/etc/init.d/named restart

Restart the ftp service to connect to the server via FTP now.

Vishwajit Kale

Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostdens, a company that aims to provide reliable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.