how to set FQDN properly in /etc/hosts

  • Posted on February 18, 2015
  • elearnAsked by elearn

I want to set my Fully Qualified Domain Name according to

I was confused by the statements : Modify your hosts file so that it resembles the following (obviously, substituting the hostname, yourdomain, tld, and YourIP values with your own): localhost.localdomain localhost hostname.yourdomain.tld hostname YourIP hostname.yourdomain.tld hostname

Now ,my hostname is test ,my domain is xx.yy , my vps ip is , will i edit the /etc/hosts file into localhost.localdomain localhost test.xx.yy.tld test test.xx.yy.tld test What does tld mean in the hostname.yourdomain.tld?Which value is it in my situation?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This question was answered by @ryanpq:

based on the information you provided your entry should look something like: test.xx.yy test

TLD is short for Top Level Domain which refers to the last section of a domain name (.com, .net, .org, etc).

View the original comment