Okay, I'm thinking about hosting my own DNS/Domain name at home for a minecraft server I'm making for a professional IP address (like myservername.example
). To my understanding, this is possible? If I provide the servers for my domain name, then I don't have to register it, therefore not having to pay for it? (I think) that I have to host a DNS server for this? I don't know too much about this, obviously, but I'm willing to learn if I can host my own domain name for "free" (without having to register it, obviously hosting servers @ home will cost me $$$). Right now I have my static IP address tethered to a .tk domain name for free, but I'd like to have a .com or.net domain name w/o paying someone else to host it. If this is possible, can anyone push me in the right direction to get started? Also correct me if anything I said is incorrect.
3 Answers
- Host a DNS server at home, set it up so the domain points to your static IP. Maybe use https://www.virtualmin.com/ for this, makes life much easier.
- Register a .com domain (this will cost you $, see for example https://tld-list.com/tld/com) and tell them to set your DNS for it.
- Pay for power which your server consumes ;)
-
So there is no possible way to have a custom domain name w/o paying for it? If so, why is this? I'm just curious 0_o– MekrouCommented Jun 29, 2019 at 17:35
-
4@Mekrou There has to be a registry for domains where you can for example check whether a domain is already taken. Otherwise you could assign google.com to your IP address. Commented Jun 29, 2019 at 17:37
-
3Ahhh. That makes sense. Don't know why I didn't think of that. Sorry for being such a noobie, we all start from somewhere!– MekrouCommented Jun 29, 2019 at 17:39
-
@Mekrou You can run an internal DNS server that resolves to your internal ip address. You then setup your devices to use this internal DNS when on your internal network. When you try to go to your made up web address your device will reach out to your internal DNS server and resolve to your internal ip address of the server. With this method you could eve use google.com if you wanted. But all this only works on your internal network.– NDEthosCommented Aug 31, 2021 at 15:04
-
It is almost never a good idea to run your own DNS servers for a single domain. Most DNS registrars will do DNS hosting for you for free when you register the domain with them. Rather than run your own DNS servers, you should use DNS hosting at your registrar to point your domain name to your server. Commented Apr 11 at 10:59
It's perfectly possible to host a website using your own 'infrastructure'. If you want a .com domain name, you will need to register it, and that's not going to be free. (10 to 15€ a year)
Hosting at home is possible. It can be a good way to dip your toes into what it takes to run a web site. I started out hosting all my sites at home before eventually finding hosting in a data center.
You should know that home hosting comes with some down sides:
- Home ISPs often block incoming connections on ports 80 and 443. If your ISP does so, you won't be able to run a site at home without including an alternate port number in the URL (like
https://mydomain.example:8443
.) Typing your domain name into your browser without that port number will show an error. - Home ISPs almost always assign your IP address dynamically using DHCP. That means that your site's IP address will change whenever your home internet reconnects (like when your router is rebooted,) or after a certain amount of time configured by your ISP. To get around this you will need to run a dynamic DNS client at home to update the DNS records for your website when the IP address changes.
- Home routers are usually configured with network address translation (NAT). Servers on your home network are not accessible directly from the outside world. To get around this you will need to configure "port forwarding" on your router to allow connections to your server from the outside world.
- You will need to leave your router and computer on all the time. Doing so could easily cost more the $100 per year in electricity costs. If you don't already leave your computer on, buying shared hosting service should cost less than that. You could buy a low power server (like a Raspberry Pi).
- You will need to configure and manage the network and web server yourself. Getting cheap shared hosting is a lot less effort.
- Home networks have horrible uptime (compared to data center) with no redundant systems. Your website will go down with power outages, network outages, computer reboots, etc.
If you want to run your site at home you will need to:
- Buy a domain name
- Sign up for dynamic DNS service which will give you a dynamic host name like
my-name.dynamic-dns-company.example
- Run a dynamic DNS client on your computer or router to update the dynamic DNS when your IP address changes. Many routers have functionality for this built in.
- Use your domain registrars DNS hosting (most DNS hosts provide DNS hosting for free with a domain purchase) or find alternate DNS hosting (for example from the dynamic DNS company.) I don't recommend hosting your DNS at home, external DNS hosting is usually free or very low cost and is much more reliable, especially when Dymamic DNS is involved.
- At your domain registrar, point your
NS
records to the values given to your by your DNS host. If you are using your domain registrar for DNS hosting, this should be set up for you already. - At your DNS host create an
CNAME
record for thewww
subdomain pointing do your dynamic DNS name (my-name.dynamic-dns-company.example
). - At your DNS host create an
ALIAS
orANAME
record (if available) for the domain apex (@
) pointing at the same. This will allow your bare domain to resolve to your home server. You can't use aCNAME
record for the bare domain name like you did with thewww
subdomain. IfALIAS
records are not available, you may be able to configure your apex domain to redirect towww
at your DNS host. If that option isn't available, you need to find a different DNS host, find a third party redirecting service for the domain apex, or live withwww
being required for your site to work. - Set up port forwarding on your router to forward ports
80
and443
to your server computer. If your ISP is blocking those ports, configure alternate ports instead. - Configure your web server on your computer. This a big step in and of itself and you will need to find a guide or tutorial for the specific operating system and web server you want to use.