You can find a good explanation about how dns work on wikippedia.
As a simplification, you can look at it like an inverse file system. To discover the IP address for mydomain.net a computer will work in a similar way that to find a file on /net/mydomain. First it must read the root dir to find where id the net dir, in dns land it will have to ask the root servers for .net. Then it will read the net dir to search for mydomain, in dns land it will ask the.net server for mydomain.
Note that this was not a technically correct answer. Filesystems don't work that way, DNS caching and multiple DNS makes name resolving more complicated. But I feel that it is a simple model.
Back to your problem: the .net root dns are saying that the authoritative dns for your domain are dns1.stabletransit.com. and dns2.stabletransit.com.. So when a computer is triying to resolve test.mydomain.net it will ask dns1.stabletransit.com for the test.mydoin.net IP, not your server, and stabletransit doesn't know anything about test.
You have two options:
1) The sensible and easy one. Forget about running your dns server and just add test.mydomain.net to dns1.stabletransit.com. There is likely some option to do it where you bougth the domain.
2) The geek way, great for learning. Delegate your dns to your own server, learn all about dns, find some secondaries (your ISP will likely do it) and have fun. You will have to read quite a lot of documentation and experiment a little. Be sure that you are able to access your domain by IP, you will need it when (not if) something goes wrong.
If hostname.local on your local network is the goal, then you don't need to do anything. You can just connect to it. If your laptop is named mylaptop, for instance, just connect to mylaptop.local. It's done using Avahi out of the box.
Best Answer
Change 127.0.0.1 to 127.0.1.1 in
/etc/resolv.conf