Anonymous - 2025-09-17

Originally posted by: aptonline

This seems to work for me:

#include <ESPmDNS.h>   // ADD: for mDNS (info.local)

...

#define HOSTNAME "infodrop" //Define the name for the hostname (don't include .local)

...

// Hostname setup and advertisement
  WiFi.softAPsetHostname(HOSTNAME);
  WiFi.setHostname(HOSTNAME);

  if (MDNS.begin(HOSTNAME)) {                 // no ".local" here
    MDNS.addService("http", "tcp", 80);     // advertise your web server
  } else {
    Serial.println("mDNS (AP) failed to start");
  }
//