Map CNAME a subdomain to other subdomain on droplet
I am hosting 2 domains on one centos droplet. And I want to alias subdomain of domain one to a subdomain of domain two. Like this.
I want to use subdomain.domain1.com as alias to subdomain.domain2.com, so that subdomain.domain1.com shows content of subdomain.domain2.com.
How to do that.
I have added this in DNS section of domain1.com
CNAME subdomain subdomain.domain2.com.
But it’s not working. subdomain.domain1.com points to error page. It should show website on subdomain.domain2.com
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.