3

I have no idea where to begin or where to look for this, so I'm hoping to get pointed in the right direction.

I've built a Raspberry Pi 4 that has a web server on it. It spins up a WiFi network using hostapd. Users connect to the network and navigate to the website running on it.

Right now, users can connect by IP address but the server's name doesn't resolve. For example, I connect to network with my iPhone. I want to navigate to web server on the Pi via http://webserver.

What is a good way to acheive this? A DNS server? DHCP? Something else?

1 Answer 1

4

Your question is imprecise, but assuming it is How to Connect a Computer to the Pi the following may help.

Use hostname.local

See Connecting a Computer to the Pi in Pi Networking

NOTE the caveats; .local resolution is NOT Pi specific (mDNS is an IETF standard - see https://en.wikipedia.org/wiki/.local) and impacted by networking caching, but should work 99% of the time. (When it doesn't restarting routers and client computers refreshes caches.)

If you don't want to use .local you will need to implement a DNS and configure all users to use your local DNS.

2
  • This answer was good in that it gave me the language I needed to go find the answer I needed, which was dnsmasq--which I already had on the Pi--and got me in the direction I needed. Thank you!
    – amber
    Dec 19, 2022 at 14:14
  • The answer from Milliways say mDNS that's totally different from dnsmasq.
    – MatsK
    Jan 3, 2023 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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