[Solved] Problems with the NodeMCU Esp8266

Hi everyone, I'm having a small project that need to use the NodeMCU ESP-12 Module, so I make some small test on it. So I found a code on the Internet that allow us to change the status of an LED via Web Server. In the following code, I successfully upload the code, but the IP adress showed on the Serial Monitor leads me to an inaccessable web. Hope any one can help me to solve this problem. Thank you!

#include <ESP8266WiFi.h>

const char* ssid = "Mywifi";
const char* password = "Mywifi's password";
int LED = 4;
WiFiServer server(80);


void setup(){
  Serial.begin(9600);
  delay(1000);
  pinMode(LED, OUTPUT);
  digitalWrite(LED, HIGH);
  Serial.print("Connecting to the Newtork");
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(".");
  }
  Serial.println("WiFi connected"); 
  server.begin();
  Serial.println("Server started");
  Serial.print("IP Address of network: "); // will IP address on Serial Monitor
  Serial.println(WiFi.localIP());
  Serial.print("Copy and paste the following URL: https://");
  Serial.print(WiFi.localIP());
  Serial.println("/");
}

void loop(){
  WiFiClient client = server.available();
  if (!client){
    return;}
    
  Serial.println("Waiting for new client");
  while(!client.available())
  {
    delay(1);
  }
  String request = client.readStringUntil('\r');
  Serial.println(request);
  client.flush();
  
  int value = HIGH;
  if(request.indexOf("/LED=ON") != -1){
    
    digitalWrite(LED, LOW); // Turn LED ON
    value = LOW;
  }

  if(request.indexOf("/LED=OFF") != -1){

    digitalWrite(LED, HIGH); // Turn LED OFF
    value = HIGH;
  } 
  
//*------------------HTML Page Code---------------------*//

  client.println("HTTP/1.1 200 OK"); //
  client.println("Content-Type: text/html");
  client.println("");
  client.println("<!DOCTYPE HTML>");
  client.println("<html>");
  client.print(" CONTROL LED: ");
  if(value == HIGH){
    client.print("OFF");
  }
  else
  {
    client.print("ON");
  }
  client.println("<br><br>");
  client.println("<a href=\"/LED=ON\"\"><button>ON</button></a>");
  client.println("<a href=\"/LED=OFF\"\"><button>OFF</button></a><br />");
  client.println("</html>");
  
  delay(1);
  Serial.println("Client disonnected");
  Serial.println("");
}


try http://10.70.5.13/

Can you provide the link please?
I'm with @ZX80 I cant believe its https.

Hi,
in the browser type only ""10.70.5.13" and not "https 10.70.5.13".

The IP address range 10.x.x.x is not routable so your browser has to be on the same LAN as the server. If you need the server on your LAN to be reachable from the Internet, you will need to tell your router to map the internal port to an external port. Then you can connect a browser to the external port (using your router's external address) and reach your server.

Wow, thank you everyone, the problem turn out the be pretty easy; all I need to do is to copy the IP adress and not include the https one. Thanks everyone, it's very helpful.

yes, thank you, I have tried and it actually worked.

Hi,
if your problem was solved, do a kindness to everyone on the forum, especially to those who helped you. Write [Solved] before your topic title,
so if someone searches and finds your topic, they'll know what the solution looks like.

And if it was solved by some help, please tick the one that best describes your solution.