The page opens but the buttons do nothing

  • ESP32
  • ESP8266
  • HTML for Gadgets

You may see

404 Not Found
Not found: /led/on

Why it happens

  • The link in the HTML and the address in the sketch differ, even by one letter or slash.
  • The right order reaches the board, but the LED is on another pin.

How to fix it

  1. Compare href="/led/on" with server.on("/led/on", …) letter by letter.
  2. Add Serial.println("led on"); inside the handler.
  3. If it prints but the LED stays dark, check the pin, the resistor and the LED's legs.

It worked if: Each button prints its own line in the Serial Monitor.

From how the part works. How web requests work.

Didn't help? Search another error or ask us.