I Need to have my subdomain to show the same files and database of the main domain without moving or duplicating the files to another directory, how to achieve this in DO (vestaCP is installed)
in main domain i have the 3 usual ns records and A record pointing to ip
in the subdomain I have only the 3 usual ns records

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi there,

The first thing that you would need to do is to add a new A record for your subdomain name and point it to the Droplet IP address. For more information on how to add DNS records, you could follow the documentation here:

https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/

After that, you would need to log in to your VestaCP and add the subdomain name as a domain alias under your main site. You should be able to do that by clicking on Web (domain.com) > Edit > and add the subdomain to the Alias list.

Hope that this helps.
Regards,
Bobby

Log in to cPanel.
In the Domains section, click the Addon Domains or Subdomains icon, depending on which you’d like to modify.
Locate the addon domain (or subdomain) you wish to modify.
Click the pencil icon next to the current document root for the domain you wish to modify.