Question

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.

Was it helpful?

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.

OTHER TIPS

When i want to redirect a subdomain to somewhere else, i'm creating a "A record" in the zone file of the DNS.

"A record" are most commonly used to map hostnames to an IP address of the host.

In your case the "A record" will be something like "vpn" => 255.255.255.255

Since you can create subdomain in DNS settings there is no problem, tools like freedns.ws are kind of good for this.

Just Login, create a subdomain and have the DNS records of the VPS assigned to the subdomain, also you may need to add a new record to the main domain name record, cause by deafult you have *.domainname.com which means all subdomain, you can add the new subdomain and have it point to the VPS.

I guess that should do it

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top