Link local IP to a Domain name

I have been working on photon since last week, I want to give a domain name to the local IP of the photon, how shall I link that IP to DNS?

How does your LAN setup look?
Do you want the Photon to be accessible from outside or only within your subnet?
For the former you’d need to have some routing, port forwarding, … to setup.
For the latter you may want to look into something like mDNS (which isn’t natively supported by Windows tho’).

Hey thanks for reply,
I want to make something where photon goes into listening mode and then by typing an URL(.local) it redirects to the local IP(i.e. page of photon.

That sounds like mDNS.
There is some sample for that by @BulldogLowell


Thanks a ton, let me give a try. And if any problem persists ill post back.

1 Like

Any option to mDNS? I want it to be compatible with all the platforms.

The paradigm is a bit different, you must first connect via SoftAP, then find your local domain through mDNS.

As pointed out in the link, you will have to install Bonjour on a PC (or just have already installed iTunes).


Can we create a captive portal as soon as the device connects to the photon(when it is in listen mode)? Because as per my research it can not link a local IP(that of Firmware) and also not supported by all platforms.

I’m not sure what you mean. When the device is in listen mode, it is not connected to any network; it is just waiting for devices to attach to it.

The device which gets attached to it, can we create a captive portal when a user connects the photon using its mobile/pc?

Still not getting it… do you want to add some test for credentials as part of the SoftAP process?

Perhaps explain your workflow.

Let me explain in more detail, once photon goes in listening mode, it behaves like a router(goes into AP mode). Thus we connect to photon’s wifi network and then to access the soft ap part we enter the IP in the browser, so instead of writing the IP can we link any URL(eg. particle.local or some .com), because using mDNS i call local IP of the photon, thus a solution to this can we make some captive portal that opens when we connect to photon’s wifi?

I see, you are mixing up your terminology and confusing me.

Captive portal; I have not seen that implemented.

are you basically trying to create an autonomous wireless device (i.e. wireless server)?

I am very sorry for the inconvenience. Let’s forget captive portal for now, so can we link the IP address of photon( to a domain name(https://guest.local or

@anithp is after something much more basic than that from what I can tell. And to me the captive portal terminology makes sense.
Basically any page request the user makes to redirect to the SoftAP page, the advantage here being it covers typos and makes it easier to direct the user to the setup page. It’s possible (and it would be a nice feature) they would also like it to behave in much the same way as some guest WiFi networks work, where once you make a WiFi connection your phone automatically knows there’s a login page that needs loading and notifies you of such. I don’t know how that is achieved but it is another way of making setup simpler. Plenty of people don’t like or understand using an IP as an address…

1 Like

Exactly Yes, I was trying to convey that. Anyways ill try more into it. And thank you so much for your time and help.

I’m with @BulldogLowell on the captive portal terminology.
The feature you are describing isn’t really a capitve portal as such (but often seen in conjunction with them) as a CP or landing page is handed out by the AP once it receives an HTTP request. The AP won’t just wildly throw out responses without being requested to do so.
What you see happening on different OSs is that they automatically trigger a request most likely against the standard gateway or DNS they receive once connected and use that as target for the request.
So to mimic this behaviour with SoftAP, you’d just need to catch any automatic request and respond the way the respective OS expects - which is the tricky part for all thinkable OSs :wink:


@ScruffR I saw one of your post where you were creating a captive portal, so how did you make a captive portal?

I’d maybe not call it a captive portal but - if I’m thinking of the same thing as you - it was only based on the standard SoftAP HTTP sample provided in the docs with the extension that instead of responding with a HTTP 400 (or other error code) I just kept handing back the index.html page (or rather a redirect) for any other case than any valid path.
But again, that alone doesn’t trigger the OSs “auto-browse”/“auto-navigate” features.

cool idea

did you implement a working version?

It is a user friendly alternative to forcing the address.