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!
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:
Set up DNS records
www.domain.com
) to your droplet’s public IP address.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.
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.
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.
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!
Heya, @magdielsanchez
You would need to create separate virtual hosts for the domain names in the Nginx configuration. We have a little older tutorial that expalins the process which you can check for reference:
If you find any difuculties, just ask and we can give you the nginx block for the domain names.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.