Several domains - one IP address

In your first example, http://example2.com will redirect to https://example1.com. This will not cause an error and if you’re OK with the domain change, this works just fine.

In your 2nd example, http://example2.com will not be redirected to HTTPS which is also not an error.

The reason Certbot uses mod_rewrite is to avoid both changing the domain users visit and to avoid doing something like redirecting from http://example2.com to https://example2.com which would cause an error if example2.com doesn’t have HTTPS set up.

3 Likes