Is it possible to point a subdomain at a droplet, without having to move domain to digitalocean?
Asked Answered
G

2

9

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?

Galliwasp answered 13/3, 2020 at 13:6 Comment(0)
R
13

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
Romeu answered 15/3, 2020 at 19:47 Comment(1)
@DeltaFlyer No, it would be the DNS manager at the site where the domain and subdomain are owned; Eg: godaddy, namecheap, etc.Deka
H
0

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.

  1. (Login to your domain registrar dns panel) and a new NS record "admin" with value ns1.digitalocean.com. Now you can manage the admin subdomain on digital ocean
  2. Go to digital ocean > networking > domains, and add new domain "admin.yourdomain.com"
  3. Click the "manage domain" in right context menu for newly added domain, it will open the "Create new record screen"
  4. In the dns record management screen on DO, add new "A" record with hostname "@" and select your droplet in "WILL DIRECT TO" field
  5. 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 
Hyperaesthesia answered 10/7 at 5:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.