Multiple domain names on same server, I'm overwhelmed, how do I get started?


I run a large web server that hosts about 15 different sites all with their own domain names. I’ve been wanting to swap them all over from HTTP to HTTPS for a long time now but every time I try to research how to actually get started I just get so confused when it comes to handling multiple domains. I need help. I’m fairly comfortable with the command line but every single “guide” seems to be aimed at only running one domain per web server.

Right now all my domain names are on the same IPv4 address. Do I need to get additional IP addresses to be able to have multiple certificates for each one?

Can I keep using a single virtual hosts configuration or do I need to break them down into one per certificate?

How do I get started?

My web server is (include version): Apache/2.4.18

The operating system my web server runs on is (include version): Ubuntu 16.04 LTS

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

No, you can rely on name-based virtual hosting to assign different certificates to different domain names, even if they’re all on the same IP address.

This is the default in Apache 2.4.

You can do whatever you want. It’s best to match how your virtual hosts are setup right now.

You can view your virtual hosts with:

apachectl -t -D DUMP_VHOSTS

If one of your virtual hosts had as its main domain with an alias of, you could assign a single certificate to that virtual host with:

certbot --apache -d -d

Rinse and repeat for each virtual host’s domain and its aliases.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.