Report this

What is the reason for this report?

How to create more than 6 domains in 1 droplet?

Posted on June 28, 2025

How can I create more than 6 domains in 1 droplet?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Heya,

You can create as much domains as you like. You first need to decide wheter to use Apache or Nginx.

After you’ve chosen your web server, here are the general steps:

  1. Set up DNS records

    • In your DNS provider’s panel (or DigitalOcean’s Networking tab), create A records pointing each domain (and any subdomains like www.domain.com) to your droplet’s public IP address.
  2. Configure virtual hosts

    • Apache:

      • Create a separate configuration file in /etc/apache2/sites-available/ for each domain.

      • Use <VirtualHost *:80> (and optionally :443 for HTTPS).

      • Specify the ServerName, ServerAlias, DocumentRoot, and log paths.

      • Enable each site with a2ensite yoursite.conf and reload Apache.

    • Nginx:

      • Create a separate server block in /etc/nginx/sites-available/ for each domain.

      • Define server_name, root, and logs.

      • Symlink each config to /etc/nginx/sites-enabled/ and reload Nginx.

  3. Set up directories and permissions

    • Create a separate directory for each site’s files (e.g., /var/www/domain1.com/public_html).

    • Make sure permissions and ownership are set correctly so the web server can access them.

  4. Install SSL certificates (recommended)

    • Use Let’s Encrypt (certbot) to secure each domain with HTTPS.

    • Certbot can automatically create SSL configs for Apache and Nginx.

  5. Test and restart your web server

    • Use apache2ctl configtest or nginx -t to check configuration syntax.

    • Restart or reload the service to apply changes.

You’re not limited to 6 domains—there’s no hard cap in Apache or Nginx. The only practical limits are your server’s resources (CPU, RAM, disk) and performance as you add more sites.

Let me know if you’d like help with example configurations or commands!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.