Not understanding what to set domain (for FQDN) to.
Please excuse the question—I've tried to do some reading and I'm still not clear on what an FQDN is or what I am supposed to set it to.
(Also, the Linode Getting Started Guide does not explain this. I'm sure it is just assumed that users will understand this…)
…
Do I set the domain name to the domain of the website I intend to build? I assumed I could put more than one website on a Linode.
Or is this something different? Or is it just arbitrary/doesn't matter what I set it to, like the hostname?
Asking here because Linode support ticket page says to direct Linux questions here!
Thanks very much!! I have used Linux a number of times but never set up a hostname/domain/FQDN name before.
4 Replies
The simple hostname for each of my Linodes is something like hammet, lesh, colucci, etc. Because I add an A record for each of those hostnames under my domain, I can set the Fully Qualified Domain Name (FQDN) to hammet.alexfornuto.com, lesh.alexfornuto.com, etc.
That is inconsequential to the websites you wish to build on your Linode. Lets set that I want to run the site for alexfornuto.com on lesh.alexfornuto.com. I would add another A record, this time blank, to the DNS zone with the same IP address. The web server (apache, nginx, etc) will handle directing the traffic for the various domains pointed at that IP to their respective "virtual hosts"
Additional reading on virtual hosts:
EDIT: Sorry, I realized I left the practical examples out. For my first example, my /etc/hostname file would simply say "hammet". My /etc/hosts file would be similar to:
127.0.0.1 localhost
127.0.1.1 debian
12.34.56.78 hammet.alexfornuto.com hammet
I would test by running the commands hostname and hostname -f.
But what made you choose alexfornuto.com as your domain name? Could you have chosen literally example.com as your domain name instead, and would it still work? I still don't understand what to set my domain to.
To quote Getting Started with Linode:
> Update /etc/hosts
Next, edit your /etc/hosts file to resemble the following example, replacing hostname with your chosen hostname, example.com with your system’s domain name, and 12.34.56.78 with your system’s IP address. As with the hostname, the domain name part of your FQDN does not necessarily need to have any relationship to websites or other services hosted on the server (although it may if you wish). As an example, you might host “
www.something.com ” on your server, but the system’s FQDN might be “mars.somethingelse.com.”
So does it need to be a "real", registered domain, or is it all just totally "dreamed up"?
Thanks much.
I buy a linode that I want to use to host people's websites. I own the domain alexeasyhosting.com. I name my Linode web, since its primary function is as a web server. I set the FQDN to web.alexeasyhosting.com. That doesn't mean that people need to go to web.alexeasyhosting.com to get to my site, that's where the virtual host directive of my web host comes in to play. But it does mean that I have an A record
Now, if you don't own a domain name, or have one from a free subdomain service, then you don't have to set a FQDN (unless you use one of the handful of services that explicitly require it). Alternately, you can use the hostname / domain combination on the remote access tab of your Linode, something like li-12345.members.linode.com.
UPDATE: In the last example, li-12345 would be the simple hostname.