質問

I'm trying to route a subdomain media.xyz.com to another droplet in digialocean. My main domain xyz.com points to a different server correctly.

My zone record looks like this

@   IN A    107.170.51.xx
www CNAME   @
media   IN A    107.170.52.xx

However this does not work and the sub domain (media.xyz.com) redirects to my main webserver.

I've read the digital ocean tutorial on this and I think I've set it up correctly. I've also looked over questions on SO and the general advice is to create a new A record.

Could anyone tell me if this approach should work..? Or is my understanding on how this should work incorrect..?

役に立ちましたか?

解決

you need to add record for your subdomain like what explained here:

https://www.digitalocean.com/community/articles/how-to-set-up-and-test-dns-subdomains-with-digitalocean-s-dns-panel

so simply in your DO control panel under your domain, do the following:

Add A record --> write down your subdomain end up with dot like this: media.xyz.com.

and your droplet IP in the 2nd field next to that: 107.170.51.xx

try that and see if it works or not!!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top