access point and DNS, I would like to access web page with a name and not an IP

I have an ESP32 set as an access point and DNS, I would like to access web page with a name and not an IP address.

Rather than typing 192.168.4.1 is there anyway I can type "Fishtank" or something similar ?

Thank you.

is it for a finite number of websites? Could you pre-program to swap out keywords to their corresponding IP addresses? or is it for any website on the web? In which case are you happy to use URLS or just keywords?

You can't do that in a local network. You can change the "hosts" file in your Windows PC to set the Domain Name, but if you use a phone, you can't access the webpage using the name. Sorry for that.

Thanks for replies.
I am trying to deploy an ESP32 for a customer and would like his company name to access a web page on an Access point instead of asking him to type 192.168.4.1 something like "widgets" or HTTPS//:widgets.com would be great ? is this possible

Thanks
David

Sorry, It can't be done. I also had a similar problem. I had setup my Home Multimedia Server but wanted to access it with a name. I spemt months to find a solution but couldn't find one.

If you want them to connect to your WiFi and type the DNS address, then it won't work. If you connect the ESP to the Internet, then you can buy a DNS Name from a DNS provider and you can tell your customers to type the website name. But there are many names already taken on the DNS site, so you should have a a very unique name.

But I have an idea. Make a poster and write the IP address on the poster, so the customers can see the IP address and use your website.

..Arnav

{cough} mDNS {cough}

TheMemberFormerlyKnownAsAWOL:
{cough} mDNS {cough}

@AWOL - you might like to give a few clues as ArnavPawarAA is not impressed with your reply

@ArnavPawarAA - have you tried Googling to see what mDNS has to offer ?

It’s in the ESP32 examples.
Probably the ESP8266 too.

ArnavPawarAA:
Sorry, It can’t be done.

I’m unimpressed by @ArnavPawarAA’s negativity.
“I’m a noob, and I can’t do it, therefore it can’t be done” isn’t a sensible approach to advice.

TheMemberFormerlyKnownAsAWOL:
It's in the ESP32 examples.
Probably the ESP8266 too.
I'm unimpressed by @ArnavPawarAA's negativity.
"I'm a noob, and I can't do it, therefore it can't be done" isn't a sensible approach to advice.

I would love a link, I dont see an access point only local wifi access :frowning:

In the IDE, if you go to File/examples, scroll down to “ESPmDNS”

Thank you looking now :slight_smile:

AH… am I asking the wrong question :frowning:

should I be asking about captive portal and a dns ??

I am not trying to connect esp32 to a wifi router but a phone to the esp32 !

Thanks

"I am not trying to connect esp32 to a wifi router but a phone to the esp32 !"

Have you looked at the access point (AP) example code? You set the esp up as an AP, then use your phone to log into it. The wifi in your phone should find it just like it finds access points for businesses like Starbucks and similar.

TheMemberFormerlyKnownAsAWOL:
It's in the ESP32 examples.
Probably the ESP8266 too.
I'm unimpressed by @ArnavPawarAA's negativity.
"I'm a noob, and I can't do it, therefore it can't be done" isn't a sensible approach to advice.

How are you going to setup a domain name server? I apologise that it is not a general approach towards a beginner. But how is it possible? But the OP wants to tell his customers a website name and then the customers would like to go to check out there. All the OP's customers would obviously have a Android phone and mDNS doesn't support Android. But there are a few tweaks that could be done for mDNS to run on Android. But how is the OP going to tell the customers that to go to chrome, enable this setting, turn that thing on, write this code in here, and blablabla. It will be too complicated for the customers, and there will also be a no use of that webserver. I have suggested many ideas to him here so the customers can take interest in the website -

ArnavPawarAA:
If you connect the ESP to the Internet, then you can buy a DNS Name from a DNS provider and you can tell your customers to type the website name. But there are many names already taken on the DNS site, so you should have a a very unique name.

But I have an idea. Make a poster and write the IP address on the poster, so the customers can see the IP address and use your website.

..Arnav

I think my idea about printing the IP address on a paper and pasting it on a wall or a board. So customers can see it and type the IP address. It would add simplicity to normal typing of IP addresses in the browser which is very hard to learn for the customers if told orally to them. (It is also simpler than tweaking the Chrome browser)

..Arnav

All the OP’s customers would obviously have a Android phone and mDNS doesn’t support Android

You’ve got that the wrong way round - Android does not support mDNS.

I’m not sure where the “obviously” comes from.

TheMemberFormerlyKnownAsAWOL:
You've got that the wrong way round - Android does not support mDNS.

I'm not sure where the "obviously" comes from.

{Android doesn't support mDNS. I got the wrong way}

But majority the customers would have a Android phone. Right? Some would bring their laptop, iPhone, or iPad. But the majority will remain using a Android phone. But is is a bit awkward that to tell the customers to go to Chrome and to these steps, and that steps aren't simple at all. So it is shame for Android that it doesn't support mDNS. That's why mDNS service won't be able to accesible to most of the customers. So mDNS is not preferred by me for such projects. Printing IP address on a paper and pasting it on a wall is a good idea because it will be simpler than that mDNS configuration.

TheMemberFormerlyKnownAsAWOL:
I'm unimpressed by @ArnavPawarAA's negativity.
"I'm a noob, and I can't do it, therefore it can't be done" isn't a sensible approach to advice.

I apologise that that was a wrong way to approach a beginner. But at least I am giving him a new idea.

..Arnav