Hi,
It looks like I’ve got myself in a muddle. I have a website hosted with Hetzner and they currently have the zone file.
I would like to set up a subdomain.mydomain at digital ocean.
I have the virtual hosts and so on correctly set up on my droplet and have added subdomain.mydomain to my digital ocean account.
I then added a new CNAME record:
subdomain CNAME digitaloceanIP
I think that’s where I’ve gone wrong?
I havent added the @ record they provided because I’m paranoid its going to overwrite or cause a conflict with my other services. (Note to self, spend more time understanding the zone file.)
What is the correct way to set this up so that it doesnt disrupt my other services and so forth?
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.
Think you just want an A record here.
CNAME will never be an ip address it will always point to an A record.
Click below to sign up and get $100 of credit to try our products over 60 days!
That correct above no longer useful. Guess it ended up below. God I hate the way this board works.
Screenshot not showing any subdomains.
But you need something along the lines of
would give you the subdomain for blog.yourdomain.com in addition to yourdomain.com both pointing you your ip 1.2.3.4. Nginx or Apache config files would then sort out the correct site to display.
See https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3 for nginx
See https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts for apache
See https://www.digitalocean.com/community/tutorials/an-introduction-to-dns-terminology-components-and-concepts for general DNS and https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean for setting up DO DNS
Hopefully they will explain it better than me.
Thanks that got me pointed to my Digital Ocean account but the subdomain nows routes to the other site hosted on the server.
The .conf file seems to be correct. Are any additional changes required on Digital Ocean?
This is what the domain settings look like on Digital Ocean http://awesomescreenshot.com/0af4dph624
Correct.
So would I set it as follows:
Remove the CNAME record.
Change the A record as follows:
subdomain A mydigitaloceanIP
?