Comments on: ESP32: Set Up mDNS (Arduino IDE) https://randomnerdtutorials.com/esp32-mdns-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sat, 10 Jan 2026 12:48:04 +0000 hourly 1 https://wordpress.org/?v=6.8.5 By: Andreas https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1148573 Sat, 10 Jan 2026 12:48:04 +0000 https://randomnerdtutorials.com/?p=182870#comment-1148573 In reply to Luen.

Yes, nearly all my devices (exclusive router and pihole) are dhcp clients. I manage fixed ip address for all these devices in my dhcp server of pihole.
But i access the ESP32 devices via their dns hostname.
I could also imagine that the behavior of ESP32 devices would be different if they will get a new and different ip address after their lease timeout.

]]>
By: Luen https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1148488 Sat, 10 Jan 2026 11:44:37 +0000 https://randomnerdtutorials.com/?p=182870#comment-1148488 Just had a thought.
My method relies on the device having a fixed IP address. (Easily achieved in your router)
Does yours?
Regards and many thanks for your very useful and informative publications.

]]>
By: Luen https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1148474 Sat, 10 Jan 2026 11:30:21 +0000 https://randomnerdtutorials.com/?p=182870#comment-1148474 There is another way to achieve this by using the hosts file.
Locate the file ‘hosts’ in C:\Windows\System32\drivers\etc (for Win11)..
Open it in notepad.
Add a line such as
192.168.1.47 ESP-kitchen
and save.
you can now enter ‘ESP-kitchen/’ (without the quotes) in your browser to open that page.
Note: The / at the end ensures that your browser treats the entry as a URL and not a search term.

]]>
By: Andreas https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1148156 Fri, 09 Jan 2026 19:18:03 +0000 https://randomnerdtutorials.com/?p=182870#comment-1148156 In reply to Reiner Ulrich.

ok Reiner, i believe i know what you mean:
On one Hand you want to have a human readable Hostname as you mentioned like “mysensor” with an suffix like 1, 2, 3 to get it unique. But this cannot be a hex string containing a mac address.
On the other hand you think about how they come up with such an unique name..
Hmm good question how to solve..

]]>
By: Reiner Ulrich https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1148103 Fri, 09 Jan 2026 15:38:36 +0000 https://randomnerdtutorials.com/?p=182870#comment-1148103 In reply to Samir Hebbo.

See my other post further down. It worked for me: 2 ESP32, Windows 11, Android 16 mobile phone, Chrome Browser on both in my case. All connected to the same 2.4 GHz Wifi of the domestic provider-configured router-box of a major internet provider here in Switzerland. Still have to try if there is any chance to have some of the devices on the 5 Ghz Wifi or the LAN-Ports provided by the same router in parallel but that’s more a question what broadcasts the router bridges and what not…

]]>
By: Reiner Ulrich https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1148098 Fri, 09 Jan 2026 15:28:07 +0000 https://randomnerdtutorials.com/?p=182870#comment-1148098 In reply to Sara Santos.

Thanks for the hint! I wasn’t aware. The required re-work on some existing projects kept me from looking into it yet but with mDNS as another (better working) goodie there will be more reward finally moving on…

]]>
By: Reiner Ulrich https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1148094 Fri, 09 Jan 2026 15:21:32 +0000 https://randomnerdtutorials.com/?p=182870#comment-1148094 In reply to Andreas.

Andreas, I hear you. But setting/getting that “secret” from the ESP32 is an extra step. This use case is nicer with mDNS: you have a bunch of ESP32, they all auto-generate their unique name (based on MAC or random number which they persist). They all use mDNS under name “mysensor”, naming conflicts get resolved by the protocol negotiating -2 -3 when they start up. You can reach their internal webserver through mysensor.local or mysensor-2.local or mysensor-3.local without ever worrying about the name or IP-Address they chose or got assigned. If you just use these sensors for yourself it is a small difference but still comfy. Even more so if you give them away.

]]>
By: Andreas https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1148018 Fri, 09 Jan 2026 12:27:32 +0000 https://randomnerdtutorials.com/?p=182870#comment-1148018 In reply to Reiner Ulrich.

“..you still have to somehow know the mac address..”

easily put this lines:
String named;
WiFi.mode(WIFI_STA);
named = (String) WiFi.macAddress();
WiFi.disconnect();

I did not check if it is necessary to bring the esp into station mode before. This simple code lines even work in the top of the setup routine..

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1147986 Fri, 09 Jan 2026 11:22:36 +0000 https://randomnerdtutorials.com/?p=182870#comment-1147986 In reply to Reiner Ulrich.

Hi.
Thanks for your feedback.
To use version 3 of the ESP32 core on VS Code, you need to switch to pioarduino: https://randomnerdtutorials.com/vs-code-pioarduino-ide-esp32/
PlatformIO no longer supports updates and is stuck at version 2.

Regards,
Sara

]]>
By: Tom Greenhaw https://randomnerdtutorials.com/esp32-mdns-arduino/#comment-1147798 Fri, 09 Jan 2026 02:19:45 +0000 https://randomnerdtutorials.com/?p=182870#comment-1147798 This is a nice idea that will improve with time as more browsers support .local.

I’d like to suggest using WiFiManager by tzapu. It eliminates the need to hardcode WiFi credentials.

]]>