1

I already have purchased a domain and set up a local server now it's just linking them.

I also have it configured so it uses a local IP 10.0.0.174, will I need to do anything else to change this so the registrar can link to a public one and how? What are the steps I should take?

This is my first time hosting a website by myself. Also, any tips maybe?

1 Answers1

1

By definition, if it's local, it can't be accessed from outside. If you want to make you server accessible from outside, you have to configure your router so as to redirect all requests to the local ip 10.0.0.174, on port 80 (http) and 443 (https) generally (depending on which ports your server is listening to). This can be set through the "port forwarding" options in your router admin interface.

After this step you will be able to access your server from outside with your global ip (check it on httpbin.org/ip) and port. Just test it by entering your_global_ip:your_port in the address bar of your browser.

Next step is to link this ip to your domain name, thanks to a DNS (translating domain name into ip, among other things). You can use duck-dns.org for example, create a subdomain there, and enter your new duckdns domain name in the CNAME section of your purchased domain provider, like :

www.your-purchased-domain.org CNAME your-subdomain-registered-at.duckdns.org
  • If you're in doubt, don't hesitate to ask for details ! – Renon Lift Oct 07 '17 at 23:42
  • I have forwarded my port, now what?? What even is my public ip now and can I type it in to the browser and get the website? I forwarded my ports from 20 to 1500 just in case. – Marcos Aleman Oct 08 '17 at 00:39
  • Forwarded your ports from 20 to 1500 ?? You have to be aware that each opened port is an opened door on the wild internet, aka a potential security risk. ONLY open the ports you need (should be 80 and 443). Then you can access your website by typing your global ip in your browser. – Renon Lift Oct 08 '17 at 01:28
  • Yeah I only did that to see if my local ip worked and I typed (n my ubuntu server) dig +short myip.opendns.com @resolver1.opendns.com to get my public ip, typed it in the browser and it didn't work. Did I do something wrong? my public ip is (sort of this but not exactly) 73.139.182.15 as a result of those commands. – Marcos Aleman Oct 08 '17 at 01:37
  • Check on https://portchecker.co/ to see if your ports (80 and 443) are opened. You don't need anything more to access it from outside with your global ip. No DNS is required for this step. – Renon Lift Oct 08 '17 at 01:50
  • Nothing wrong with an ip starting with 73. What server are you using ? Apache ? – Renon Lift Oct 08 '17 at 02:17
  • Yeah Apache but it's fine now it works – Marcos Aleman Oct 08 '17 at 02:29