Installing SSL on subdomain error- vhost would conflict with other HTTPS VirtualHosts within Apache

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:
certbot --apache -d -d
It produced this output:

To fix these errors, please make sure that your domain name was entered correctly and the DNS A/AAAA record(s) for that domain contain(s) the right IP address. Additionally, please check that your computer has a publicly routable IP address and that no firewalls are preventing the server from communicating with the client. If you’re using the webroot plugin, you should also verify that you are serving files from the webroot path you provided.

My web server is (include version):
Apache 2

The operating system my web server runs on is (include version):
Centos 7

My hosting provider, if applicable, is:
dedicated server

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 control panel

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):

I have created a subdomain for a domain. I successfully added SSL to domain but it gives below error for subdomain.

selected vhost would conflict with other HTTPS VirtualHosts within Apache. Please select another vhost or add ServerNames to your configuration.

My DNS is correct. I can access http version of subdomain site without any problem.

I even added subdomain and IP to /etc/hosts

My goal is to add SSL certificate to subdomain via certbot --apache -d -d

I have five more domain on my virtual host and I created SSL cert for all of them without any problem.

I have tried to change sub directory address…change NameAlias…

both domain and sub goes to same IP address. I created two different files like and on Apache sites-available and sites-enabled…

1 Like

Hi @touchstonewords

your command can’t work. If you use --apache, two dns entries are required, non-www and www must have an ip address.

Your dns entries ( ):

Host T IP-Address is auth. ∑ Queries ∑ Timeout A Alexandria/Virginia/United States (US) - Comcast Cable Communications, LLC Hostname: yes 1 0
AAAA yes Name Error yes 1 0

So your www version isn’t defined, so your command can’t work.

  • remove the www version in your command (or)
  • add a dns A record -> same ip address

Then try it again.

You are right. I updated apache conf file (Server Alias part) and re-try without www and it works. Two questions:
1- If I resolve IP issue for www subdomain, then I can install its ssl separately.
2- For auto-renewal, one cron job is enough to auto-renew all of 6 domains. and if something does not go through (for any of my domain), I get an email alert?


You can create a certificate and install it separately. But if the www subdomain uses the same vHost as the non-www-subdomain, it may be easier to use your first command (two -d options) and use one vHost with both domain names.

Normally, yes, you should get a mail.


Hey @JuergenAuer

I appreciate your help.

1 Like

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