1

I'm trying to work out how I could configure my machine (presumably my machine's DNS settings) to resolve subdomains to the appropriate full domain of my site, mostly for shorthand purposes in development. For example, I would like 'www' to resolve to 'www.mysite.com', 'blah' to 'blah.mysite.com' and so on.

I don't really know where to start other than that I'm pretty sure this is outside the remit of simple /etc/hosts shenanigans. Will I need to run a local DNS server?

1

1 Answer 1

2

Just add mysite.com to the search domains. In your resolv.conf (assuming you are using *NIX), add the following

search mysite.com local.lan
nameserver <ip>
nameserver <ip>
1
  • Thanks a lot, that's exactly what I was looking for :) DNS config noob...
    – unwitting
    Nov 6, 2014 at 8:43

Not the answer you're looking for? Browse other questions tagged .