Question
Several domains -> 1 Virtual host : CNAME or ServerAlias ?
I have some virtual hosts / domains On 1 Droplet
and need to bind several domans to 1 of vhosts
Let it be
site1-bla-bla-1.com
site1-bla-bla-2.com
site1-bla-bla-3.com
I see 2 options:
1.
Add to /DNS menu domain site1-bla-bla-1.com
with CNAME records:
CNAME site1-bla-bla-2.com. site1-bla-bla-1.com
CNAME site1-bla-bla-3.com. site1-bla-bla-1.com
and also add to /DNS domains site1-bla-bla-2.com and site1-bla-bla-3.com
just with A records
and set digitalocean nameservers to domain names
2.
Add to /DNS domains site1-bla-bla-1.com , site1-bla-bla-2.com, site1-bla-bla-3.com
with A records
In httpd.conf:
ServerName site1-bla-bla-1.com
ServerAlias site1-bla-bla-2.com
ServerAlias site1-bla-bla-3.com
Is it correct?
What would be better?
Add a comment
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×