Access server thought a domain in a local network

Under my network, I have installed an PC with Ubuntu server 16.04 and I would like to use this server to serve local sites and web applications in my network.

Is there a way instead of accessing my server through its IP, to setup a domain name which I will use to access my server ?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer


If you’re wanting to host websites locally, you’ll need a static IP address or you’ll need to use dynamic DNS – a static IP is preferred. You would then point your domain name to said static IP or use a CNAME in the event of dynamic DNS.

The issue you may run in to with dynamic DNS is that most domain registrars don’t allow you to use a CNAME on the root domain (i.e. – also known as CNAME flattening. So you may not be able to use an actual domain in such a case – you’d be limited to using whatever domain or sub-domain is provided by the dynamic DNS provider.

A few examples of such providers would be NoIP and Dyn.

Most ISP’s only provide static IP’s to business clients since most residential clients really don’t fall under valid need/use policies, so that would mean you may need to get a business account or use dynamic DNS.

If you don’t have a business account, it would also be best to check with your ISP to see if they allow you to use their services for local hosting as many do not and will suspend service if they find that you are (which wouldn’t be hard as they’d see incoming traffic coming down to your location site).

Beyond networking, you’ll need to open up the required ports on your Ubuntu server, such as port 80, 443 (if you plan to use HTTPS/SSL), etc – secure the server since it will be public – etc.

Also one thing to note, a standard connection from most ISP’s (20-100Mbps) isn’t going to be enough to serve much more than low-traffic scenarios as said connections often suffer from far more noise, jitter, and congestion than dedicated lines than data centers use, so speed may be an issue and traffic to the server will ultimately affect your internet speed elsewhere unless you have a line that is dedicated specifically to the hosting portion of your network.