So I am new on making websites, I use node.js and I have been using ngrok to make my friends able to access my website, and I want to know if i am able to make an URL go to a lan website.
EX: putting www.youtube.com and clicking enter but not going to youtube, going to my website
Is it possible? Like, changing the ip that the URL is assigned to one that corresponds to my website. This way I have the website on for everyone but if someone on the same net goes to youtube it redirects to the site.
There's probably half a dozen ways to do this, all require you to have some control over the network.
E.g.: One could add an authoritative DNS entry in the DNS service on your network that's being promoted by DHCP and then enforce the use of that DNS server by blocking all other DNS servers.
E.g.: If there's a proxy service on the network one could enforce it's use and well change the content there.
These are probably the easiest, the rest becomes either expensive or quite technical.
All-in: yes it can be done. But should it be done: probably not: you're in hacker territory here.