How to Add a Domain in VestaCP: WEB, DNS, SSL, and Post-Setup Checks (Step-by-Step)

How to add a domain in VestaCP

Adding a domain in VestaCP is the first step to running a website, email, and optionally DNS management on your server. VestaCP is a popular lightweight control panel, often installed on a VPS, because it lets you quickly add web domains, create directory structures, manage databases, and handle SSL certificates. However, for a domain to actually work on the internet, adding it in the panel is not enough—you must also configure DNS and run post-setup checks.

Before you start, make sure you have: (1) a server with a public IP and a working VestaCP installation, (2) access to manage the domain’s DNS (registrar or DNS provider), (3) a clear target—website only, or website + email + DNS. VestaCP is most commonly used on Virtual Servers because you need full control over ports and configuration. For higher performance, consider Dedicated Servers. If you do not want to maintain a server panel yourself, start with Hosting.

This guide follows a practical sequence: add the domain under WEB, decide whether DNS is managed in VestaCP or externally, obtain SSL, and finally verify that the domain works with and without www, over both HTTP and HTTPS.

1) Prepare the domain and decide where DNS will live

The first decision is DNS management. Option A: DNS stays with an external provider (often your registrar). In that case you can skip VestaCP DNS management, but you must create the required records manually (A, CNAME, TXT, etc.). Option B: DNS is hosted on your server and managed in VestaCP. Then you need to delegate nameservers (NS) to your server and ensure the DNS service is correctly configured.

If you want the simplest start, external DNS with an A record pointing to your server IP is often enough. If you want unified management and easier email-related records (like DKIM), VestaCP DNS management can be convenient. Either way, the domain must resolve to the correct IP.

2) Add the domain in the WEB section

Log in to VestaCP and open “WEB”. Click “Add Web Domain”. Enter your domain (for example, example.com). Decide if you want a www alias—some setups have an “Aliases” field where you can add www.example.com. Enter an email address if requested (it can be used for certificate requests or admin alerts).

After you add the domain, VestaCP creates a directory structure, usually under /home/user/web/example.com/public_html. That is where your website files should go. If you run a CMS, you will later create a database and configure the application. At this point, once DNS points correctly, you should be able to see a default page or at least reach the server.

3) (Optional) Add a DNS zone in VestaCP

If you chose to manage DNS in VestaCP, go to “DNS” and click “Add DNS Domain”. Enter the domain. VestaCP usually generates basic zone records such as SOA, NS, and an A record to your server IP. Then you must configure your registrar to use the nameservers of your server installation. Only use this approach if your server is actually running DNS services and your setup supports it.

If DNS remains external, skip this step and create the necessary records at your DNS provider. Most commonly you need: an A record for example.com → SERVER_IP and (if you use www) either an A record for www → SERVER_IP or a CNAME www → example.com. After saving changes, allow time for DNS propagation. Depending on TTL and caching, this can be quick or take several hours.

4) Add SSL (Let’s Encrypt or a commercial certificate)

Once the domain resolves to your server, enable HTTPS. VestaCP often integrates with Let’s Encrypt, which can issue a free certificate quickly. The key requirement is that the domain (and www if included) must point to your server and be reachable on ports 80 and 443. If DNS is not fully updated, certificate validation will fail.

In the WEB section, open your domain and enable SSL. If available, enable both SSL and Let’s Encrypt. After issuance, verify that the certificate covers the hostnames you use. If you need a commercial certificate or multi-domain option, you can use SSL Certificates and install it according to your web server configuration.

5) Verify: DNS, redirects, www and non-www

After setup, test four scenarios: http://example.com, http://www.example.com, https://example.com, and https://www.example.com. Ideally, HTTP redirects to HTTPS with a 301, and www redirects to your preferred canonical version (with or without www). Redirects can be configured via your web server config or VestaCP templates.

Also check for mixed content (HTTP resources embedded on an HTTPS page). If you use a CMS, update the site URL to https and rewrite internal asset links if needed. If you see certificate warnings, confirm you are using the hostname covered by the certificate and that the certificate chain is installed correctly.

6) Common issues and quick fixes

If the domain does not open, first verify the A record points to the correct IP. If DNS is correct, check firewall rules and whether ports 80/443 are reachable. If Let’s Encrypt fails, the usual cause is DNS not pointing to the server yet, or port 80 being blocked. If www does not work, you may be missing a DNS record for www or the alias is not added in VestaCP.

Another common issue is seeing the “wrong site” when multiple domains share one IP. This can happen when the web server selects a different virtual host based on the Host header. Ensure VestaCP created the correct vhost configuration and that your domain is properly defined.

Summary: recommended sequence and checklist

A safe sequence is: (1) add the domain in VestaCP WEB, (2) configure DNS (A and optionally www) or delegate NS if you use VestaCP DNS, (3) confirm the domain reaches the server via HTTP, (4) issue SSL and enable HTTPS, (5) configure redirects and test all variants. If you still need a domain, use domain registration, and if you need stable infrastructure for a control panel, choose a suitable VPS or dedicated server.

VestaCP is convenient for a fast start, but it requires disciplined DNS and security practices. Once the basics are correct, adding domains becomes predictable: add the domain, enable SSL, upload your site—and you are live.