Multiple A record certificate

Hello.
This is my domain (for this discussion): example.com
My domain has two A records which point to the same IP address.
A.example.com -> 1.1.1.1
B.example.com -> 1.1.1.1

I ran this command:
certbot -apache -d B.example.com

Everything went OK and apache was updated without any issues. However, when I browsed to my web site (B.doron.com) it said that the certificate is invalid because im not goind to A.example.com

Why A? I specifically mentioned "B.example.com" in the command...
What am I missing?

Thanks!

1 Like

This would be a lot easier if you would provide the actual domain names.

But, one guess is you are redirecting B to A in your Apache conf

If you provide the actual names we could diagnose this properly

3 Likes

Welcome to the Let's Encrypt Community, Doron :slightly_smiling_face:

Why not just do this?

certbot --apache -d "A.example.com,B.example.com"

2 Likes

Hi Mike,

Thanks for the quick reply. The browser returns an error saying that Im trying to go to "B" but the certificate is issued on A. Let me try to show you - so my real "A" is called "TASKS" but I specifically requested it on "B". This is the error:

2 Likes

Hi Griffin,

I dont need "A" - thats the issue.

1 Like

I think @MikeMcQ is probably on track about the redirect from B to A.

2 Likes

I checked it but there is not any mention in apache for "TASKS"... the only "common ground" here is that I have two A records pointing to the same IP. But, if I execute the command you showed would the certificate be OK for both subdomains?

I mean this command:

certbot -apache -d "A.example.com,B.example.com"

1 Like

What is the output of:

sudo apachectl -S

Please put 3 backticks above and below the output, like this:

```
output
```

3 Likes

Correct. It wouldn't solve the redirect, but it would ensure that both domain names are covered by the certificate being served.

SNI will handle that easily.

3 Likes

Let me try... :slight_smile:

1 Like

You might not have your Apache VirtualHosts configured correctly.

Hence...

2 Likes

What does this error mean? when executing the command:

The requested pache plugin does not appear to be installed

What am I missing here? It worked find with one subdomain earlier...

1 Like

It needs to be --apache, not -apache. Missing a hyphen.

2 Likes

Griffin,

You did the trick with the "A.example.com,B.example.com" command!

Much appreciated !!!

2 Likes

It's a bandaid, but it will get you moving along until you get your Apache configuration how you want it. :slightly_smiling_face:

Be sure to look in your .htaccess files for goofiness as well.

3 Likes

Thanks!

3 Likes

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