Domain name is replace by IP address

March 7, 2013 7.1k views
Hi Guys, I am new on digital ocean. I am trying to attach my subdomain to public ip. But I realized when I enter my FQDN subdomain address it is showing the public ip address in browser Early help will be very much appreciated Regards PC
3 Answers
Hi,

To do this you need to:

1. point your domain to these name servers:
ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com

2. log in to your digital ocean control panel
3. click on "DNS"
4. Click on "Add Domain"
5. in the name field, put the FQDN e.g: example.com
6. in the IP address field, put the public ip address of your server e.g: 192.81.222.228
7. click on "Create Domain"

It can take a while for your DNS records to update but when everything is updated the domain should point to your server but not redirect to the ip address
or use the advanced domain options of your existing service to add a A record for your host address with the IP of your droplet.

It sounds like you are using forwarding or rewriting option, which is usually part of the simple domain settings (and sometimes all that is offered). You need to use advanced domain options (or maybe even edit the zone file directly).

If you have the domain mydomain.com and want droplet.mydomain.com to go to your droplet which has a public IP address of 194.194.1.1, add the following record in the advanced domain settings for mydomain.com

droplet A 194.194.1.1

droplet.mydomain.com will go straight to your droplet instead of being forwarded/rewritten so will remain in the address bar of your browser.

How you do that exactly will depend on how/where your domain is being hosted.
Have another answer? Share your knowledge.