2

I have my own domain name, richardbrowning.cf, and I want to host my own website (using this domain name) on my Android phone. My Android isn't connected to Wi-Fi (I am using Mobile Data).

I started locally hosting my website on my Android, (and it was available at http://mylocalipaddress:myport. Then I went to my registrar and added an A DNS Record setting the target to my local IP Address. Now if I go to richardbrowning.cf:myport, I can view my website. But it is still only local.

So I have two issues. I want to make my website public, not just local (so everyone can view my website) and I want to remove the need for putting :port at the end of the domain/website.

By the way, an end note is that I tried putting my external IP Address into my DNS Record instead of my local IP Address, but this doesn't work because there is nothing being hosted to this external IP Address. So if I could maybe host my website to my external IP Address and then put this external IP Address into my DNS Record, then that would work. But I can't find a way to host my website to my external IP Address. I only see ways to host my website to my local IP Address (locally). Thanks in advance.

  • "So if I could maybe host my website to my external IP Address...". You can't do that behind NAT. Instead you need to do port forwarding in case you are behind a router. In case of mobile data you are most probably behind a CGNAT: https://android.stackexchange.com/a/205807/218526. Contact your ISP to get a static public IP, if possible at all. – Irfan Latif Jan 16 '21 at 10:40
  • Thank you for your answer, but I am not on Wi-Fi, so there is no router involved. I have Mobile Data only. I understand that it would be more convenient with a static IP Address (because they don't change), but right now that isn't my concern. I just want to figure out a way to make my website public/external instead of just local. Any help with this is appreciated. Thank you. – Richard Browning Jan 16 '21 at 17:16
  • Note that most mobile carriers use a carrier grade NAT system for all mobile device, and most also block nearly all inbound traffic. – acejavelin Jan 16 '21 at 18:16
  • I don't think I am blocked from doing this by my carrier. I could do it. I just need to know how. Can anyone help with that? – Richard Browning Jan 16 '21 at 20:38
  • I don't think any carrier provides public IPs, if not part of a special plan. You must be behind a CGNAT. Even if you don't want a static IP, it must be public. Internet is the public network, so private IPs are not accessible over there. You can confirm if your external (which you think is public) IP is not within the range of private IP addresses: https://en.wikipedia.org/wiki/IP_address#Private_addresses – Irfan Latif Jan 20 '21 at 16:47

0 Answers0