Hosting subdomain of someone else's domain

I’m doing a website for a client who is currently hosting with an ISP who gives out and hosts free subdomains for non-profit organisations. Since the ISP does not allow PHP on their servers, I’ve talked to them about letting me host this particular subdomain on my dreamhost account, which they agreed to.

I’ve sent them the IPs of Dreamhost’s Domain Name Servers, only to get back an e-mail saying they would need the IPs of the Webserver, and they would under no circumstances delegate a subzone of their Domain to a DNS not owned by them.
Since I’m on a shared account, I wonder how to proceed from here… If I find out the IP of my own domains, would I send that to them, so they can place it in their DNS? If so, would the process of adding the subdomain to my account be as simple as usually?
Would it be a problem with this setup if Dreamhost moved my account to another server, and if so, any estimates on how frequently that happens (weekly? monthly? once a year?).

My client really wants to keep their URL the way it is, so simply registering a new domain doesn’t seem to be an option.

If I’ve been unclear or vague anywhere in this post, please let me know.

You will need to add the parent domain to the DreamHost system first, even though you are not hosting this. Otherwise you will not be able to add the sub-domain. Other than that, it should work fine (unless the IP address changes, see below).

Yes, if the IP address used by the Apache instance serving the sub-domain changes, your sub-domain will cease to work and you will need to forward the new IP address to your client’s ISP.

Thats a difficult question to answer. DreamHost does move things around quite frequently, but personally my sites have maintained their IP addresses since I created them.


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )

Thanks a lot for the quick reply!

[quote]"You will need to add the parent domain to the DreamHost system first, even though you are not hosting this. "


Is this something that needs the consent of the domain-holder, or is this just a behind-the-scenes workaround for technical issues that does not require their assistance? Because after all the ISP has not agreed to so far, this doesn’t sound remotely like they would like it.

Is there a quick solution to finding out my own domains’ IP address? I could in all probability write a php script that outputs it, but is there anything faster than that? Will “ping” from a command line give me correct results?

Yep, just a workaround so you can actually add the sub-domain. Unless they modify the DNS for the parent domain to also point to DreamHost, it will not affect their site at all.

Now this is an interesting question :slight_smile:

Firstly, you can not guarantee that all the domains and sub-domains you host will share the one IP address, even if they are hosted on the same DreamHost server. For example, all my domains here at DreamHost resolve to different IP addresses and they are all on the same server. In fact, I have sub-domains that resolve to a different IP address than the parent domain.

Basically, you can not be sure what IP address the sub-domain will receive until you add it to the DreamHost system.

Now here is the interesting part…

Lets say you have added the sub-domain, you can not ping it to determine its IP address, because you have not yet configured the external DNS to resolve the sub-domain and you can’t do that without knowing the IP address! A catch 22 situation.

One solution (untested) would be to create a free sub-domain and set it to mirror the real sub-domain. Pinging the sub-domain should give you the correct IP address. Something like the procedure outlined below;

Edit: On further reflection, it may be possible to use the IP address that your DreamHost server resolves to. Example; if your sub-domain is on the ‘bixel’ server, you could ping to obtain the IP address. Once again, this is untested by me.


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )

That’s very good information, but it left me somewhat confused.
Let’s assume that the solution you suggest works, what IP address would I give them to begin with? Any one of my domains (just pinged them, addresses are indeed different) - or the dreamhost server I’m on (I think this would be, from the “machine” column in control panel’s “manage users” table)?

edit: ah, I see you edited. I’ll try giving them the ip of the server. I’ll post how it works out.

That is the crux of the problem I alluded to above :slight_smile:

The good news is I just tested the second method, using the IP address that your DreamHost server resolves to, and it appears to work.

To test I simply changed my local ‘hosts’ file so that (for my system only) one of my domains resolved to the IP address of the DreamHost server (in my case instead of its usual IP address. Accessing the domain via my browser worked fine.

To to recap; After adding the sub-domain to the DreamHost system, Just ping the DreamHost machine that your sub-domain is hosted on and provide that IP address to your clients ISP.

Sorry for not recommending the simplest method first, but the fact that DreamHost uses multiple IP addresses for each server threw me off for a bit :slight_smile:


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )

Mark, you’ve been most helpful! Many thanks!

  • Philipp

Don’t thank me yet Philipp.

It appears my second method does not work as I thought. The old IP address was still in my DNS cache which deceived me into thinking it did indeed work. After flushing the DNS cache, the domain resolved to the same IP address as my DreamHost server, but was not accessable from my browser.

Which leaves us with that catch 22 again, how to find the IP address that DreamHost assigns to the sub-domain when it is added to the system.


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )

How about the following:

From the control panel, under “manage domains”, I can click on “DNS” for any domain or subdomain to change DNS settings. The page this brings me to lists the correct IP address for any of my domains under “Non-editable DreamHost DNS records For”.

I can also get this information for the subdomain I just added. I noticed that the new subdomain has the same IP as an existing subdomain on one of my own domains (while all other domains and subdomains I have list different IPs), but might this still be the correct answer?

Of-course! now why didn’t I think of that. :blush:

Just to confirm, I added a non-registered domain to my dreamhost account, obtained its IP address using your method and modified my hosts file to suit. I could then access the domain using my browser.

I am sorry for leading you astray when the solution was so obvious :slight_smile:


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )