6

I have a dedicated working server at home (LAMP and localhost). I also have a domain name.

My questions is, given my domain name, how can I make that public .com site point to my home computer?

1
  • The procedure to do that is mostly unrelated to Ubuntu and depends on your domain name provider. Aug 2, 2015 at 15:31

2 Answers 2

12

Get your ip address by googling "what is my ip address". Then take that ip address and add an A record for your domain that points to that ip.

If the computer that's hosting the site connects to the internet through a router then you will need to log into the admin gateway for that router by typing your default gateway ip address into the address bar in any browser.

Your router's ip will usually be 192.168.1.1 or 10.0.0.1.

Once you log into the admin portal for router then you will have to forward ports 80 and 443 to the internal ip of the computer that is hosting the site.

You can get the internal ip of your computer by typing either ifconfig or ipconfig into your console or command prompt. Your internal ip will usually start with 192.168.###.### or 10.0.###.###.

3
  • 1
    echoip.com is a useful and quick way to get your IP (very handy in scripts using curl). Aug 2, 2015 at 3:10
  • curl ipecho.net/plain
    – oldboy
    Aug 15, 2017 at 1:55
  • Since the above comments' links appear to be dead, this address seems to work: myexternalip.com/raw Apr 14, 2020 at 4:04
2

First know your web server's ip address. After that edit your domain's A record and point your domain to that ip. You do this by adding an A record for @ points to your ip. You also need to port forward your router so that your web server can be accessible from other computer on internet. For detail walkthrough read this article on pointing domain name to home web server.

1
  • Welcome to Ask Ubuntu! I recommend editing this answer to expand it with specific details about how to do this. (See also How do I write a good answer? for general advice about what sorts of answers are considered most valuable on Ask Ubuntu.) Aug 2, 2015 at 15:30

Not the answer you're looking for? Browse other questions tagged .