I've been trying to figure this out for a while. I've been googling but I couldn't really figure it out.
I have bunch of VPS's for my clients. Each has its own IP address, with a single website on it, and its own domain name which the client controls (so I have no access to their DNS settings).
I setup the hostnames of the VPS's as a subdomain of my website (srv01.companyname.com, srv02.companyname.com etc.) and have an A record for each one of them, pointing to the IP address assigned. I also have a reverse DNS that matches each IP address with its companyname.com subdomain (or hostname), as this seems to avoid outgoing emails being considered spam.
I tell clients to create CNAME records and make them point them to their VPS's hostname (ex. srv01.companyname.com).
This setup is solid for me because since I don't have control over the domain names, if I had to move the VPS and/or change its IP address I could do it independently, by just changing the A and reverse DNS records, without any action from my client.
Now, the problem is that everything works, but while you can see the website on the main domain name, you can also see it on the companyname.com subdomain, which I don't really want.
So I have 2 questions:
1) is there any way to avoid this? Would there be another way to have domain names use CNAME records so that I could still have control over the IP addresses, without the website being visible on the subdomain?
2) if there is no way and I have to have clients point their domain name to the IP address directly, what should I set the hostname to, for reverse DNS to work? Could I still keep the same hostname and reverse DNS and emails would go through OK?
I appreciate any help or advice.
Thanks!!!
No comments:
Post a Comment