I want one subdomain to point to another on the same domain.
DNS Records
Type Name Value
-----------------------------------------
A s1.example.com 10.20.30.40
CNAME s2.example.com s1.example.com
s1.example.com has a valid A record. If I go to s2.example.com I get the server's default virtual host.
What is the correct way to achieve this? Am I doing this wrong by attempting this via the DNS records? Do I need to set up a ServerAlias
in the virtual host for s1.example.com instead?