me-no-dev / ESPAsyncWebServer

Async Web Server for ESP8266 and ESP32
3.7k stars 1.21k forks source link

Request on hostname #1361

Open schuppeste opened 10 months ago

schuppeste commented 10 months ago

Hi, i cant serve Files like "index.html" as Hostname. Only as IP and full name of File "index.html" or "index.htm"

my esp32 matches Hostname "Switcher" and in Network "switcher.fritz.box".

I can only Request Files "192.168.178.21/index.html" , how i can access my Index File on "switcher.fritz.box".

Tried several different attempts.

Belleson commented 10 months ago

mDNS (a.k.a. Bonjour) must be enabled in your code

https://forum.arduino.cc/t/help-understanding-mdns-on-esp32/1026655

https://github.com/espressif/arduino-esp32/blob/master/libraries/ESPmDNS/examples/mDNS_Web_Server/mDNS_Web_Server.ino