Navo updhya
Navo updhya

Reputation: 23

how to link local IP Address to a domain name in local network, so website can be accessible to any device using the domain name?

I am a NOOB to programming and networking so please forgive me for any mistakes.

I have searched on stack,google for my problem but the solutions i found didn't went well with me and so please do consider answering my question even if you consider it is simple or duplicate question.

My Problem - I have a nodeJS server built using express and it can be accessed on address http://192.168.209.239:8001/ now i want to access server using domain names like normal website say i want to access the server using http://myserver.app/

found Solutions - i found about DNS but i was not able to set it up, then i found that editing the etc/host file can solve this but domain name was only working on my laptop where the app is running, if i connect my phone to same network* and when i type the domain name it does not work.

I found about mDNS. but i was a very old post which told we can use Apple Bonjour but it is not working as i learned that Microsoft has done some implementation of mDNS so make Bonjour work disable mDNS in registry and i am not willing to do that.

What i ask - please give me step by step guide how to stepup DNS or mDNS on my machine so if any device connects to my network it can access the NodeJS app thought its browser using domain URL http://myserver.app/

I am using [email protected], [email protected], Windows 11 version 21H2 build 22000.376

My Network is like I have connected my mobile hotspot to laptop and any new device to connected to hotspot so may my mobile is kind of a wifi router.

if a different laptop connects to my hotspot i should be able to access the website using the domain name. myserver.app

My Phone is using Android 11 and please do consider I do not want to use any online DNS providers like easyDns or AWS i want a local solution which i can run on my laptop

Upvotes: 1

Views: 3197

Answers (2)

Kareem Adel
Kareem Adel

Reputation: 704

Starting with Android 9 Pie it is possible to change DNS globally, provided they support TLS. Just go in

Settings → Network & internet → Advanced → Private DNS

Upvotes: 0

Mani
Mani

Reputation: 1

  1. Ideally you need to DNS server for this : but its wont work with dynamic IP as your machine ip can change after reboot
  2. You can add domain as host entry on each machine : this will not work with mobile and also need to change ip as your machine / server ip change
  3. If you have static ip , just go for any dns service provider easydns , aws and as its inetrnall ip will work for all devices which are in network
  4. Found This may work for y https://www.noip.com/support/knowledgebase/how-to-configure-ddns-in-router/

Upvotes: 0

Related Questions