FQDN & nameservers
While running certain commands via ssh, every now and then I see that the FQDN is missing. My server will be used to host my "primary domain" and a bunch of sites I run for clients.
From what I understand, the FQDN should be set up once for the entire server, and not on a per site basis. Should therefore the FQDN value be my primary domain and not that of any clients, who may at some point move to another server?
If so, how exactly do I set the FQDN?
Finally, are nameserver values available for my server? In the account where I manage my primary domain it asks me for nameserver values (format ns1.domain.com) and it won't simply accept an IP value. How can I get around this and point that primary domain to my Linode?
Thanks
Stef
16 Replies
If yes, then you'd first login there and add your domain in the DNS Manager – e.g., mydomain.com.
While you're there, think of a name for your Linode, e.g., stef.mydomain.com, and create an A record for it. That is your FQDN.
Next, login to your VPS via SSH and change the hostname to stef.mydomain.com. Exactly how you do this may differ according to the distribution you use. A little googling should help, e,g, "Ubuntu change hostname".
After changing the hostname, I'd suggest restarting the Linode to ensure the change persists across a reboot.
I believe the Linode nameservers are ns1.linode.com and ns2.linode.com. But I don't use Linode's DNS so I could be wrong
Give everything time to propagate and you should be good to go.
@sleddog:
I believe the Linode nameservers are ns1.linode.com and ns2.linode.com. But I don't use Linode's DNS so I could be wrong
:)
There are five servers now:
ns1.linode.com [69.93.127.10]
ns2.linode.com [65.19.178.10]
ns3.linode.com [75.127.96.10]
ns4.linode.com [207.192.70.10]
ns5.linode.com [109.74.194.10]
@sleddog:
I believe the Linode nameservers are ns1.linode.com and ns2.linode.com. But I don't use Linode's DNS so I could be wrong
:)
Because like stef25 I am also just getting my linode setup for hosting, I'm curious as to who you use as your DNS provider, and why.
What's your reasoning for not using Linode's DNS management? What 3rd party service do you use/would you recommend, and why?
Thanks.
@Eriksrocks:
What's your reasoning for not using Linode's DNS management?
Not putting all my eggs in one basket.
I don't mix domain registration, hosting, or dns.
Makes it very easy to change any or all of those service providers if/when needed and with minimal hassle.
@Eriksrocks:
@sleddog:I believe the Linode nameservers are ns1.linode.com and ns2.linode.com. But I don't use Linode's DNS so I could be wrong
:) Because like stef25 I am also just getting my linode setup for hosting, I'm curious as to who you use as your DNS provider, and why.
What's your reasoning for not using Linode's DNS management? What 3rd party service do you use/would you recommend, and why?
Thanks.
:)
I manage DNS for domains hosted with several other providers in addition to Linode. Those providers offered a mixed bagged of DNS options – some had an in-house system with a web interface, others expected you to host DNS yourself.
Years ago I chose to utilize a third-party DNS service. Having a single location for DNS management (regardless where the domain is hosted) makes administration much easier. I use dnsmadeeasy.com. Been with them for years, never had an issue.
If I was only managing domains that were hosted at Linode (and I wanted to save a few dollars) I'd probably use Linode's DNS service. It offers good redundancy and is managed by Linode. What more could you want?
As for me, I'm planning to use Linode's DNS manager because I have no reason not to.
@sleddog:
While you're there, think of a name for your Linode, e.g., stef.mydomain.com, and create an A record for it. That is your FQDN.
Next, login to your VPS via SSH and change the hostname to stef.mydomain.com. Exactly how you do this may differ according to the distribution you use. A little googling should help, e,g, "Ubuntu change hostname".
That's not how you set up your FQDN.
set your hostname to something without dots, like "kev", in debuntu it's done in /etc/hostname. /etc/hostname gets read at boot, so if you change it after boot, you have to run hostname -F /etc/hostname
the next step to to configure /etc/hosts, have a line like
127.0.1.1 mydomain.com kev
test with the hostname command and hostname -f command.
you can change 127.0.1.1 with your eth0 ip address if you want.
@obs:
You should also go to your linode dashboard, click the network tab for your linode, and set the "Reverse DNS" to your FQDN
When I enter the domain I want to use as FQDN under the Network tab, it tells me
No match was found for "domain.eu". Reverse DNS must have a matching forward entry for one of your IPs.
How can I resolve this?
> set your hostname to something without dots, like "kev", in debuntu it's done in /etc/hostname. /etc/hostname gets read at boot, so if you change it after boot, you have to run hostname -F /etc/hostname
In the /etc/hostname file I just see one word which is "domain" as in domain.eu - the one I'd like to set as my FQDN. Is just that one word sufficient?
@stef25:
How can I resolve this?
You need a forward A or CNAME record that resolves to your IP and you need to wait for it to propagate. Once you've waited that out, it will work.
-James
> the next step to to configure /etc/hosts, have a line like
127.0.1.1 mydomain.com kev
Done. "mydomain" and "kev" are the same, is this a problem?
> test with the hostname command and hostname -f command
.
Done, all good.
Thanks for the replies!
@stef25:
In the /etc/hostname file I just see one word which is "domain" as in domain.eu - the one I'd like to set as my FQDN. Is just that one word sufficient?
In general, your Linode should have a hostname - something you come up with and that hostname should have an A record in a domain you control. One of my Linode's for example, I've named mt-elbert so it's hostname is mt-elbert and that's what's in /etc/hostname.
I also control the domain irgeek.com so I have an A record for mt-elbert.irgeek.com and the reverse DNS for the primary IP on that Linode is also mt-elbert.irgeek.com. The hostname + domain is what's meant by the FQDN.
You don't have to do it this way, but it's been considered best practice for a long, long time.
-James
@irgeek:
@stef25:How can I resolve this?
You need a forward A or CNAME record that resolves to your IP and you need to wait for it to propagate. Once you've waited that out, it will work.-James
If my domain name is
Sorry, I'm very to new to all this
@stef25:
If my domain name is
www.stef.eu
Your domain is stef.eu in that case.
@stef25:what should the values in "hostname" and "aliases to" be? If I put "www" and "
www.calamansi.eu " respectively, I get errors. Entering the IP of the server also produces errors.Sorry, I'm very to new to all this
:(
It sounds like you're trying to set up a CNAME. CNAME's are a special kind of DNS record that can't share their name with other records. If you have and A record for www you can't also have a CNAME for www. So you need to enter either an A record that points to the IP or a CNAME that points to a name which in turn points to the IP.
Does that make more sense?
-James