What I'm trying to achieve

I'm trying to make a domain name direct to the local IP address of a Raspberry Pi running Raspbian, primarily so I don't have to remember an IP address. (I know I can set a static IP to the Pi however I would prefer a domain name).

What I've tried


Initially, I found this tutorial. It works great, as long as you access mydomain.local from a Mac or a Linux machine running avahi daemon. I'm aware it can be accessed from Windows by installing the Bonjour service, however I'm mainly going to be accessing the domain from Android so this isn't going to work.

DNS Server

Next, I decided to run a DNS server with dnsmasq off the same Raspberry Pi by following this guide. I got it all setup and working, all that was left was to specify the DNS servers in my router configuration. Long story short, my router (EE) doesn't like using a different DNS than it uses by default and it doesn't work.

Pointing domain to local IP

I tried creating a free domain on no-ip.com and directing it to the desired local IP, 192.168.1.x. That didn't work (ERR_NAME_NOT_RESOLVED), so I tried the same thing on freedns.afraid.org and got the same result.

Is there anything else I can try?

  • What else could I try?
  • Is there a way to get mDNS working on Android?

Thanks for your time, any help is appreciated.


It sounds like you wanted your DNS topology like this:

Clients > Router > RaspberryPi

That should work for your LAN as long as the RPi has it's upstream DNS configured properly. There is a project called pi-hole based on this concept.

REF: https://github.com/pi-hole/pi-hole

If you are having problems with your router the other option would be to point your clients directly to the Pi instead of the router. This does require reconfiguring all your clients DNS settings, which may be undesirable.

The end of your post starts to get in to public DNS which raises the question: What are you trying to do here? Do you want your Pi to be in a local DNS entry or a global one? These are VERY different things.

If you did make a global DNS record for your Pi you would then need to configure port forwards through your router to make the Pi visible to the public internet. This is something I have to caution you against as a potentially fatal security hole. Unless you are a security professional I would not put a RaspberryPi facing the public internet.

This would look like: Public DNS (Domain name) -> Your public IP (Must be static or DDNS)-> Your router (port forward) -> RPi

  • I'm wanting the Pi to be in a local DNS entry. For now, I've changed the DNS settings individually on devices which works and I suppose that's the only option for me. Thanks for your help. – Joe Jun 19 '17 at 20:39
  • You've now proven that the your Pi works as a DNS server which leaves the question: Why doesn't the router forward DNS inquiry to the RPi? That's where you need to look if you want to continue down this rabbit hole. Try updating the firmware on the router, reset factory default and check all the settings. – HackSlash Jul 13 '17 at 18:08

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.