124

I'm trying to host a subdomain for my site with a different hosting company and I'm running into issues on how to set it up.

Here are the specifics:

  • Domain is registered with GoDaddy.
  • Nameservers are pointing to DiscountASP.net where ASP.NET app has been happily running for couple of years.
  • Would like blog.mydomain.example to point to my account with DreamHost.com to take advantage of their LAMP stack.

I have added blog.mydomain.example to DreamHost (after adding mydomain.example) via their control panel. I thought I would be able to add a subdomain entry on GoDaddy to point to DreamHost, but all they allow is blog.mydomain.example = new URL.

In theory I could just take our .biz or .net domain and host it on DreamHost but was hoping I could do it all with a subdomain.

So, to summarize I'd like to know if what I want to do is feasible and if so, how do I go about it (given the constraints of GoDaddy, DiscountASP, & DreamHost).

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
mattsmith321
  • 6,793
  • 5
  • 28
  • 18
  • 2
    If you are using ENOM, here is the Domain Settings screenshot where lab.bitspedia.com sub domain points to different host. [link]http://www.bitspedia.com/2012/01/how-to-configure-sub-domain-that-points.html – Asif Shahzad Jan 23 '12 at 06:28
  • This totally describes my situation and question. – Adem Tepe Oct 05 '21 at 11:39

3 Answers3

172

A sub domain is part of the domain, it's like subletting a room of an apartment. A records has to be setup on the DNS for the domain e.g

mydomain.example has IP 123.456.789.999 and hosted with Godaddy. Now to get the sub domain

anothersite.mydomain.example

of which the site is actually on another server then

login to Godaddy and add an A record dnsimple anothersite.mydomain.example and point the IP to the other server 98.22.11.11

And that's it.

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
Saif Khan
  • 18,402
  • 29
  • 102
  • 147
  • 7
    See video demo: https://vimeo.com/71369042 – Asif Shahzad Jul 30 '13 at 22:08
  • 3
    I didn't know you could have more than 255 in any of IP address parts! Isn't an IP address 32 bits? So 8 bits per section? which means maximum of 255 – mavili May 22 '14 at 19:12
  • 17
    @mavili The IP address ending in 999 is of course not valid, he's just using it for demonstration purposes kind of like the fake 555-1234 phone numbers they show in movies. – ARM Aug 26 '14 at 19:28
  • 1
    Maybe this is a stupid question, but important for me. Will all the traffic have to go from main server connected to mydomain.com like a proxy or is it used only to redirect? – Marek Oct 24 '15 at 11:29
  • I did this also with Hostgator, and it seems to work great! – Chris Prince May 24 '17 at 02:56
  • 1
    @ARM Still it doesn't make sense to show an invalid example of something, because by definition its not an example. – chesscov77 Jun 07 '18 at 22:32
30

You just need to add an "A" record in the DNS manager on Godaddy. In that "A" record put your IP from dreamhost.

I know this works since I'm doing the very same thing.

Bryant
  • 8,660
  • 1
  • 33
  • 53
  • 1
    Will this send a redirect http Message to The client? – Koray Tugay Mar 16 '14 at 19:12
  • 3
    No. The client will stay at the subdomain because it will resolve to the specified IP address. If you use the forwarding feature, the subdomain actually resolved to one of GoDaddy's servers, which sends the redirect message. – Alex K Jan 25 '15 at 00:54
  • What about SSL? I just hope someone answers this, I am using this method too but I don't know how I can handle SSL for the subdomain. – Adem Tepe Oct 07 '21 at 09:29
8

UPDATE - I do not have Total DNS enabled at GoDaddy because the domain is hosted at DiscountASP. As such, I could not add an A Record and that is why GoDaddy was only offering to forward my subdomain to a different site. I finally realized that I had to go to DiscountASP to add the A Record to point to DreamHost. Now waiting to see if it all works!

Of course, use the stinkin' IP! I'm not sure why that wasn't registering for me. I guess their helper text example of pointing to another url was throwing me off.

Thanks for both of the replies. I 'got it' as soon as I read Bryant's response which was first but Saif kicked it up a notch and added a little more detail.

Thanks!

mattsmith321
  • 6,793
  • 5
  • 28
  • 18