How to create a A record record on my server in etc/named/? reddit / selfhosted ---------------------------------------------------------------------- et-nad · 2023-10-08 12:02 Hello, ​ I am selfhosting my dns and I am having issue with A record. I don't know how or where to add it. I googled and it says I need to add the record to /etc/named/ folder on the vps where the domain is pointed to. ​ ​ Thank you in advance ---------------------------------------------------------------------- jusepal · 2023-10-08 12:23 That dir is for bind9. Assuming you've already installed it then the config should be any of the .conf files in there. Depends on your distro there might be a few or there might be just 1. Inspect them and you'll find the main, its usually self explanatory. Then follow bind9 docs to configure it https://bind9.readthedocs.io/en/latest/reference.html Or spare yourself the hassle and use something with a gui to conveniently manage the records without need for dabble in command line and shit, like technitium https://technitium.com/dns ---------------------------------------------------------------------- et-nad · 2023-10-08 12:35 Hi, ​ Thanks for the info. ​ I have a webapp and it is auto installed using just a few commands in cmd line. I have basic knowledge of how to use cmd line. So it installed DNS server for me as well automatically but its not working and when I asked my registrar it said I need to add A records on my host side for it to work. And thats how I ended up here lol. ---------------------------------------------------------------------- jusepal · 2023-10-08 12:41 Then no. You're not selfhosting your dns. Your registrar is either incompetent or confused as do you. Webapp has nothing to do with dns. Installing a dns server doesn't automagically made you selfhost your dns. Your registar probably offered a free hosted dns for your domain registered with them. Use that instead. ---------------------------------------------------------------------- et-nad · 2023-10-08 12:48 Hi, No no. ​ I have a vps and a it has few ips. I have a domain as well. So my installation script creates the DNS records during webapp installation. ​ I only need to setup glue records on my registrar to make the self hosted dns work. So I've set up [ns1.domain.com](https://ns1.domain.com) and [ns2.domain.com](https://ns2.domain.com) and the ns1 and ns2 are the ips of my VPS. The thing is this has worked for me before(1 year ago) and only thing I could think of if maybe I need to update the script or so. Because I have isntalled this app many times and it has worked, I only needed to install the glue records and then the NS and it would work. ---------------------------------------------------------------------- jusepal · 2023-10-08 12:55 I'm not sure what that webapp is so I'll leave it as it be. If you already setup a glue record then you got to install an authoritative dns server on the vps where the glue record is pointed to, to actually handle the incoming dns query to it. Use either bind9 or technitium. Bind9 for command line, technitium for convenient gui. Either should work. And as previously said, for bind9 the configuration file is a .conf file in /etc/named. Read the previously linked docs of bind9 to configure it. ---------------------------------------------------------------------- phein4242 · 2023-10-08 13:09 This book explains it well: https://www.oreilly.com/library/view/dns- and-bind/0596100574/ Good luck! ---------------------------------------------------------------------- et-nad · 2023-10-08 14:43 Thank you so much for all your help. ​ I'll install technitium.