I have a domain, example.com, and I want to point a subdomain, test.example.com, at one of my droplets, WITHOUT having to move the domain to digital oceans nameservers. is this possible and how?
Is it possible to point a subdomain at a droplet, without having to move domain to digitalocean?
Asked Answered
Yeah, it's very much possible. Go to your DNS manager, and create an A record for your subdomain pointing to your DigitalOcean droplet's public IP.
For example, to point your subdomain test
to your droplet with IP 13.13.13.13
, set the following A record.
Type Name IPv4 Address
---- ---- ------------
A test 13.13.13.13
@DeltaFlyer No, it would be the DNS manager at the site where the domain and subdomain are owned; Eg: godaddy, namecheap, etc. –
Deka
Its possible to transfer the subdomain to digital ocean and manage it on DO and it can be assigned a droplet ip address from within DO.
- (Login to your domain registrar dns panel) and a new
NS record
"admin" with valuens1.digitalocean.com
. Now you can manage theadmin
subdomain on digital ocean - Go to digital ocean > networking > domains, and add new domain "admin.yourdomain.com"
- Click the "manage domain" in right context menu for newly added domain, it will open the "Create new record screen"
- In the dns record management screen on DO, add new
"A" record
withhostname "@"
and select your droplet in"WILL DIRECT TO"
field - Create and save record
Now, your admin.yourdomain.com points to your droplet. You don't need to hardcode IP, your domain will keep pointing to the droplet.
At your domain registrar dns panel
Type Name Value
---- ---- ------------
NS test ns1.digitalocean.com
At Digital ocean > networking > domain dns panel
Type Name Value
---- ---- ------------
A @ Select target droplet
© 2022 - 2024 — McMap. All rights reserved.