Question

how to set up a host name in DigitalOcean?

Hi,friends. I need some help to set up a host name. I know this question have already be submit. but that steps can not solve my problem. i need a new way.


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.

First you have to create an A record for your domain and point it to the Droplet’s IP address. Let’s say your domain is server.example.com.

Edit the /etc/hostname file and change the hostname to server.example.com. One you have done that, reboot your server to use the new hostname. You can reboot the server by running the command:

reboot

Do you mean FQDN, because for the droplets the hostname is the name of the droplet?