Different Subdomains, from Different IPs – on the Same Domain
There are times when you might want (or need) to set up sites or scripts that live on different servers than your main site. There are a myriad of reasons for doing this, and they may include your main server not meeting the requirements to run a specific script – or wanting to add confusion to where your other site(s) or server(s) are located. I won’t get into the “why” here – only the “how”.
These instructions apply to a domain registered at GoDaddy, but the principles apply to most registrars.
1) Login to GoDaddy and go to your Domains. Click on the one you want to use and you should see the screen with all that domain’s details including the nameservers and under it should be “Total DNS”. If it says “available”, great – go to step 4. Else, go to step 2.
2) Click on Nameservers, click on Default, and select Default Hosted Nameservers.
3) Refresh until you see that Total DNS is available.
4) Click on Total DNS Control and MX Records.
5) Under “A Host”, you should see a line with the “@” and an IP, and next to it an “Edit” box (the one with a pencil inside of it). Click it and change the IP to whatever the actual IP is of your site’s server.
6) Now, you want to click on “Add a New Record” in the “A Host” box. Do it, and you want the record to be a “*” and the IP address of the subdomain you are hosting elsewhere.
7) After this is done, check to see if your site still shows up and then verify that your subdomain shows up.
Both are on different servers. Yay!
This can seem confusing when you have, for example, a hosting account at Lunarpages and one at Hostgator – and you want *only* one particular subdomain to be served from Lunarpages (and the main site and all other subdomains served from Hostgator). Don’t be confused; just set up hosting at Lunarpages with your “main” domain name, and define the subdomain in the control panel, and proceed as usual. There is no way your main site will be served from there as long as you define that specific subdomain to be served from the Lunarpages IP in your A Records (at your registrar).