It is common knowledge that you need to point your domain to a server before you can access the site using the domain. However, if for some reasons you would like to preview your website without your domain, you may do so. Follow the tutorial guide closely and you will be able to do just that.
Step 1 – Login into your web server via SSH.
Step 2 – Create a custom folder within the directory.
Step 3 – Change the folder’s ownership to DirectAdmin.
chown diradmin:diradmin /usr/local/directadmin/data/template/custom
Step 4 – Copy the default domain virtual host file from the default template.
cp -pa /usr/local/directadmin/data/templates/virtual_host2.conf /usr/local/directadmin/data/templates/custom/
Step 5 – Edit the custom domain virtual host file by adding the code below to the ServerAlias.
*The example is based on hostname settings for the server, which requires the hostname to be pointed to the server. Replace ns$$.small-dns.net to a valid hostname.