Question

Do droplets get an automatic (cryptic) dns name?

Posted February 7, 2020 138 views
DNS

On aws for example you get something like http://cosi166b.s3-website-us-west-2.amazonaws.com . Is there something like that by default, or available? In other words, I’d like to enter a dns name instead of an ip address into my code.But I dont care what the name is.

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.

×
2 answers

I’d like to enter a dns name instead of an ip address into my code

You can explore how to map a custom domain to your Droplets or Floating IP addresses.

https://www.digitalocean.com/docs/networking/dns/how-to/add-domains/

Hello, @pitosalasWhale

You can setup a hostname for your droplet and use it instead of the IP address. You can use a subdomain like myserver.domain.com and point it to the IP address of your droplet. When you deploy a droplet the rDNS will be configured automatically based on the hostname you choose for the droplet as well.

Once you’ve pointed your subdomain to the IP address of your droplet you need to wait for the DNS to propagate. This might take up to 24 hours, however it usually happens a lot faster.

Hope this helps.

Regards,
Alex

Submit an Answer