FQDN/hostname in new install.

Hi, I installed Virtualmin using script on Debian 8, went smooth.

What I am confused about is FQDN/hostname bit.

I set up server as domain.com

hostname -f = domain.com

I want my main server email adress be domain.com

Why it is advisable to use hostname.domain.com as your server FQDN?

https://www.virtualmin.com/documentation/installation/automated#fqdn

If I use hostname.domain.com, then I create virtual server in virtualmin as domain.com ??

At the moment I created whole thing under domain. com, then created virtual server with same domain.com, is that correct?

Or should I reinstall in with hostname.domain.com ?

Thank You
Kris

You can use domain.tld but usual practice is hostname.domain.tld where “hostname” can be whatever you want or need, e.g. in case of multiple servers: server1, server2, server3…, or hostname, hosting, primary, etc. If this is new server i would suggest to change now to hostname.domain.tld.

Guys, what about nameserver settings in post-installation wizzard? Whatever i type doesn’t get resolved from the internet side. Should i use dns management console for my domain and insert A records named “ns1” and “ns2” in it? Or mybe NS records.

And wich dns servers should my virtualmin use? Before installing Virtualmin my primary dns server was set to ISP’s dns server and secondary to 8.8.8.8. Will that work for web hosting or the virtualmin installation should use itself as dns server?

in mine i got

127.0.0.1
8.8.8.8

works

I know that will work but is it the recommended way to go? Can we get some admins on this topic please?
I’m by-the-book admin, i try to avoid stuff like editing /etc/hosts file because it’s a trick that works when dns servers are not configured properly. In dns resolution process first thing that is checked is the cache on the server, then /etc/hosts file, then the dns server used.

Guys, what about nameserver settings in post-installation wizzard? Whatever i type doesn’t get resolved from the internet side. Should i use dns management console for my domain and insert A records named “ns1” and “ns2” in it? Or mybe NS records.
Use ns1.domain.tld in big window and ns2.domain.tld in small and click to not check the servers. One of the reason for this problem is because your domain doesnt have DNS records (probably waiting to be attached to virtual server) and so there is no records for your name servers. This is just one reason why this is happening.

And wich dns servers should my virtualmin use? Before installing Virtualmin my primary dns server was set to ISP’s dns server and secondary to 8.8.8.8. Will that work for web hosting or the virtualmin installation should use itself as dns server?
DNS settings are located in resolv.conf and to make it easier to understand here is mine:
search domain1.tld domain2.tld domain3.tld (and so on…)
nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 111.222.333.444 (this is server ip)

File “/etc/hosts” should automatically fill up based on your settings.

Whats the first line search

What domains you put there?

All domains you are hosting on your server, if is only one then just put that one if there is more list them all, without “www” and each domain separate with space.

Should it be ns1.mydomain.com or just mydomain.com

My hostname is ns1.mydomain.com and i host mydomain.com