how to set up a host name in DigitalOcean?

August 3, 2016 470 views

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.

2 Answers

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

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

  • All of you said I have done. I have create an A record for domain and point to the Droplet's IP address, but I can' t open the web site( in broswer. Obviously this web site has been bound to IP.

    • Are you able to open the website using the IP address? It is possible that your domain has not propagated yet, this can take up to 24 hours. Can you ping the domain name using your computer's command prompt or terminal?


  • hi, my friend. are you busy? I can't find someone help me,but you. so, I need your help.Once again, I can open the website by IP address.And I try to ping the domain name in my computer's command prompt, it return my IP address. It means my DNS had been updated. The important is that I can open the in my server. But I can not open the website in extranet network. so, what should I do?

    • Which web server are you using to run the website? For confirmation, your website works with the IP address correct? And if possible, can you provide me the domain name that you are using?

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

Have another answer? Share your knowledge.