5

I got a Synology NAS, with different virtual hosts, so i got a DDNS (user.synology.me), let's say the virtual hosts are server1, server2 and server3, so i can access them using server1.user.synology.me, etc.

I pointed my example.com to user.synology.me using a CNAME, then I created a subdomain: server.example.com, using CNAME pointing it to server1.user.synology.me, the problem is, when I go to server.example.com it takes me to user.synology.me, instead of server1.user.synology.me.

What can I do here?

Patrick Mevzek
  • 9,273
  • 7
  • 29
  • 42
Spider351
  • 51
  • 4
  • What do you mean by "when I go to server.domain.com" and what do you mean by "it takes me to" ? How are you going? What is it? – Michael Hampton Oct 24 '18 at 00:32
  • If I write server.domain.com the content i receive is the one from domain.com (which is the one from user.synology.me), instead of the content of server1.user.synology.me – Spider351 Oct 24 '18 at 00:44
  • Are you talking about going to a web page? – Michael Hampton Oct 24 '18 at 00:46
  • 1
    What does your DNS table look like? It sounds to me that you have the DNS CNAME and A records setup incorrectly. – Chris Pietschmann Oct 24 '18 at 00:48
  • I don't even have a A record, it's like this: name type target domain.com CNAME user.synology.me server CNAME server1.user.synology.me if i try to make a A record point to user.synology.me it says "Invalid value in dnsrecord" – Spider351 Oct 24 '18 at 00:52
  • Possible duplicate of [Why can't a CNAME record be used at the apex (aka root) of a domain?](https://serverfault.com/questions/613829/why-cant-a-cname-record-be-used-at-the-apex-aka-root-of-a-domain) – kasperd Oct 24 '18 at 06:50

2 Answers2

2

I think I need to draw a diagram to understand what you're doing here, but to be honest, point your CNAME to the proper A record for the destination. Don't chain CNAMEs.

RFC1034 allows for chaining in a technical sense, but it is simply poor practice.

A similar question was asked previously, and it's worth looking at the discussion: Is a CNAME to CNAME chain allowed?

LeeM
  • 1,218
  • 9
  • 13
  • Oh, no, i don't want to point a CNAME to a CNAME, i have my DDNS, i pointed my DDNS with a CNAME, i also have subdomains on the DDNS, what i want is to point a CNAME subdomain to a DDNS subdomain, but when i'm doing it instead points my CNAME subdomain to my DDNS root domain. – Spider351 Oct 24 '18 at 00:19
0

I just "fixed it". In my NAS I had in virtual hosts some hosts created: server1, server2, server3, etc. In the name of the host I had server1.user.synology.me

I just changed it to server.domain.com and now it works.

Dave M
  • 4,494
  • 21
  • 30
  • 30
Spider351
  • 51
  • 4