Why may a single DNS server be responding two different things for the same query?

I own a domain and configured through Digital Ocean DNS service –does this even matter? I have a CNAME for *.my.domain to ingress.my.domain. When I do a dig command, I get different results, e.g.: ➜ ~ dig abc.my.domain @8.8.8.8 ; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> abc.my.domain @8.8.8.8 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<-…

nginx ignores server_name and default_server

I want to serve two domains from the same IP. This is my config: http { log_format main ‘$server_name $remote_addr – $remote_user [$time_local] “$request” ‘ ‘$status $body_bytes_sent “$http_referer” ‘ ‘”$http_user_agent” “$http_x_forwarded_for”‘; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; include /etc/nginx/conf.d/*.conf; server { listen 80; listen…