5 AnswersNew Answer
You can build your own server hardware, install a web server and a domain name server (DNS) on it. You just can't connect it to the internet. Which is fine if you are building an intranet. Giving yourself a domain name and using your own DNS would be like giving yourself a phone number. It's fine on your own network but if you wish to connect to other networks you have to play by the agreed upon rules.
Josh Greig, you are absolutely right. I was merely expanding on your answer to provide more information. For small networks you can get away without a domain name server by using static ip addresses and making entries in... /etc/hosts - Linux c:\Windows\System32\drivers\etc\hosts - Windows 10 This also works for local class C network addresses that are connected to the internet via a router or for setting up a local test/development server.
Thank you for sharing your knowledge about
Martin, yes that would be good for people in places where Internet service is hard to afford like Cuba. There is a video on a group creating an intranet for gaming and some very basic ecommerce at https://www.youtube.com/watch?v=lEplzHraw3c . North Korea probably does similar. I thought he'd want something more conventional for a domain name, though.