-1

I have this situation:

  • my own domain example.com registered at companyA.com
  • a cPanel/WHM hosting at companyB.com, where I have the website for example.com.
  • a new VPS, provided by companyC.com

At companyA.com, I setup the Nameservers of example.com to point to ns1.companyB.com and ns2.companyB.com, and everything works. Now I need to setup another website on the VPS, and make sub.example.com point to it.

This is my first VPS and I need some basic knowledge:

1) Do I need to change the hostname of the VPS? (currently vpsXXX.companyC.com)

2) Do I need to set the Nameservers on the VPS? To What? I don't want to run my own DNS.

3) At companyB.com I think I should insert an A record for sub.example.com pointing to the VPS IP, right?

The VPS has 1 IP Address, and runs CentOS 6 + CentOS Web Panel

Thank you very much

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
mrzhero
  • 101
  • 1

1 Answers1

0
  1. Do I need to change the hostname of the VPS?

A system can only have 1 hostname but many DNS names can be pointed towards it, but there is no technical requirement that favours one of those additional DNS records over the current hostname.

If you do change the hostname, just ensure that the reverse DNS records is updated accordingly.

  1. Do I need to set the Nameservers on the VPS?

Normally you should not need to run your own DNS server to manage your domain(s).

But DNS resolving will need to be configured on the VPS so it can do DNS lookups. Typically the VPS will be deployed with correct settings in /etc/resolv.conf already but if not commonly used public DNS services are Google's 8.8.8.8 and 8.8.4.4.

  1. At companyB.com I think I should insert an A record for sub.example.com. pointing to the VPS IP, right?

Yes! As simple as that.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • Ok, I did point #3 and it works! Also, checked point #2, they are set to Google DNS, so ok. #1 is still not so clear, though.. let's say I change the hostname to match my own domain.. what should I do to check the reverse DNS? Thank you! – mrzhero May 09 '15 at 12:06
  • Reverse DNS is typically manager though Your hosting provider, check their management console and documentation. From the command prompt `dig -x ` and also don't forget IPv6 – HBruijn May 09 '15 at 15:09