I'm trying to set up my domain as follows, but I'm not actually sure if it's possible.

I have a domain where I would like the base and www addresses to go to my static site, but others to go to my application server. For example:

My domain is registered with Dreamhost, and my application is on a VPS at Webbynode. I've set up the domain in Dreamhost to use Webbynode's nameservers:


And in Webbynode I've set up a wildcard A record to point to the IP address of my VPS:

*  A

and this works nicely, if I go to app.example.com it resolves to my application server at Webbynode.

However, what I'd like to do is have example.com and www.example.com go to my static site, hosted back at Dreamhost, whilst still having any other domain go to my app. What I've done to try and achieve this is set up these DNS "NS" entries at Webbynode, trying to get Dreamhost to resolve these domain names:

(empty)  ns1.dreamhost.com  NS
(empty)  ns2.dreamhost.com  NS
(empty)  ns3.dreamhost.com  NS
www      ns1.dreamhost.com  NS
www      ns2.dreamhost.com  NS
www      ns3.dreamhost.com  NS

(I don't have a fixed IP address at Dreamhost so I can't just set up simple A records).

However this doesn't work... does anyone have any idea if this is possible and if so how it could be done?


I've got this working now, as above for the domain (i.e. registered with Dreamhost, but using Webbynode's nameservers). To delegate the DNS for www.example.com to Dreamhost, I've got the following DNS entries set up:

www.example.com.      ns1.dreamhost.com.  NS
www.example.com.      ns2.dreamhost.com.  NS
www.example.com.      ns3.dreamhost.com.  NS

(note the full stops at the end)

And to get example.com to resolve to my static site, I set up CNAME record:

example.com.   www.example.com.   CNAME

So now, example.com and www.example.com go to my static site on Dreamhost, and if they change the IP address of my shared hosting it won't affect me, and all other subdomains go to my application server.

This seems to work nicely, but if anyone knows a better way to do it I'd be happy to hear it.

Thanks to all who replied.

  • you may not have a dedicated IP but your IP should still be static so simple A records will work – anthonysomerset Mar 12 '11 at 12:26
  • True, but as I understand it, it's not guaranteed to be static so DH could change it which would render my site inaccessible. – Dave Hollingworth Mar 13 '11 at 15:51

You would need the following DNS entries in your zone file would do the job. The wild card entry should be the last.

*      A    IP_OF_APP_SERVER

you should also be able to use dreamhosts nameservers for hosting if you wish and ask them to add the wildcard A record if you dont have the ability to do it as part of your hosting package there, you may have to open a support request with them to get it done though

your method of trying to delegate the nameservers wont work because its already been delegated to your dnswebby setup. @Sameers Anwser otherwise is the correct one if you wish to continue to use dnswebby for dns

  • I looked into this as you suggested, but alas, according to their wiki, they'll only do this if you have a VPS, not on the shared hosting package that I've got (wiki.dreamhost.com/Wildcard_DNS) – Dave Hollingworth Mar 13 '11 at 16:07
  • its worth asking though – anthonysomerset Mar 13 '11 at 16:22
  • You were right - I asked and they told me that it was no problem, so although I had it working the other way, I've changed the nameservers back to DH and now I've got it set up with them. Thanks for the advice! :-) – Dave Hollingworth Mar 15 '11 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.