Search code examples
dnssubdomainshared-hostingvpswebmin

How can I set up a subdomain to another host?


Hey guys, so I recently purchased a cheap vps for me to play around with, to get used to working with linux, command line, and servers.

I also have a shared webhost that I host my site on.

For now, I want to keep my site on my shared webhost until I fully find out how to work with my vps, then I'll slowly start moving projects, ect over.

So I have my domain, (I.E domain.com) connected or whatever to my shared host. But I want to like, assign a subdomain to my vps, is this possible? Like vps.domain.com?

For example, I was setting up webmin, can I set up my domain for when I go to vps.domain.com:10000, it actually goes to the site, (and I don't mean redirection), as if I were going to it's ip http://00.000.000.000:1000?

How can I do this? I bought my domain from namecheap, and my shared webhost is using cpanel, I can provide more information if you guys need.


Solution

  • You just need to create an A resource record for vps.example.com. Usually you can do that in the configuration panel of the provider you've registered example.com with.