[GH-ISSUE #341] How do i set a domain name #286

Open
opened 2026-02-28 01:24:32 +03:00 by kerem · 1 comment
Owner

Originally created by @jcmojj on GitHub (Mar 30, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/341

I wish to use a domain name like "www.example.com" other than http://192.168.4.1/
I tried the library example DNSServer where they used dnsServer.start(DNS_PORT, "www.example.com", apIP); and it worked pretty well. I just had to type at the browser http://www.example.com and it finds it ip that was 192.168.1.1. When I used other names other than the correct one at the captive example that you used to inspire your own code the pages shown at the browser was created by webServer.onNotFound method.
It looks simple to solve, so i entered your code lib and change the line dnsServer->start(DNS_PORT, "*", WiFi.softAPIP()); to dnsServer->start(DNS_PORT, "www.example.com", WiFi.softAPIP());, but it doesn't work. How can I do it? I think that a real DNSServer should lets us type server name other than server ip, after all it is why DNSServer was created.
Thank you for your lib. For the first time one lib really delivers what promisses with a very fast implementation.

Originally created by @jcmojj on GitHub (Mar 30, 2017). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/341 I wish to use a domain name like "www.example.com" other than http://192.168.4.1/ I tried the library example DNSServer where they used `dnsServer.start(DNS_PORT, "www.example.com", apIP);` and it worked pretty well. I just had to type at the browser http://www.example.com and it finds it ip that was 192.168.1.1. When I used other names other than the correct one at the captive example that you used to inspire your own code the pages shown at the browser was created by webServer.onNotFound method. It looks simple to solve, so i entered your code lib and change the line `dnsServer->start(DNS_PORT, "*", WiFi.softAPIP());` to `dnsServer->start(DNS_PORT, "www.example.com", WiFi.softAPIP());`, but it doesn't work. How can I do it? I think that a real DNSServer should lets us type server name other than server ip, after all it is why DNSServer was created. Thank you for your lib. For the first time one lib really delivers what promisses with a very fast implementation.
Author
Owner

@tzapu commented on GitHub (Mar 30, 2017):

hi, thanks for the appreciation,

i think the redirect code might need to check for domain exceptions as well... currently it tries to redirect everything to the ip, have not checked if all of that works as it should for a long while...

look in ken taylor s branch, he did some stuff to handle a specific domain i believe

good luck

<!-- gh-comment-id:290364105 --> @tzapu commented on GitHub (Mar 30, 2017): hi, thanks for the appreciation, i think the redirect code might need to check for domain exceptions as well... currently it tries to redirect everything to the ip, have not checked if all of that works as it should for a long while... look in ken taylor s branch, he did some stuff to handle a specific domain i believe good luck
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#286
No description provided.