0

I have a little issue here trying to enter to a subdomain, I would like you to get me clear about the command line I am using because actually it got me confused.

server block for domain

listen       80;
server_name  just4bettors.mobi  www.just4bettors.mobi;
root   /home/c0pt/capilleira/capilleiraclickandgamblemobile/www;

for subdomain

listen 80;
server_name www.desktop.just4bettors.mobi desktop.just4bettors.mobi;
root   /home/c0pt/capilleira/capilleiraclickandgambleweb/dist;

the domain is working great here, but not the subdomain, once I put www.desktop.just4bettors.mobi in the browser, I get a message Server not found

now, the issue I have in the command line

If I do

$ host just4bettors.mobi
  just4bettors.mobi has address 190.171.28.156

and the one above is right, but if I do:

$ host desktop.just4bettors.mobi
  Host desktop.just4bettors.mobi not found: 3(NXDOMAIN)

OK, there says that the subdomain is not found.

If I do

$ dig +trace desktop.just4bettors.mobi

; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> +trace desktop.just4bettors.mobi
;; global options: +cmd
.           501531  IN  NS  f.root-servers.net.
.           501531  IN  NS  e.root-servers.net.
.           501531  IN  NS  m.root-servers.net.
.           501531  IN  NS  j.root-servers.net.
.           501531  IN  NS  h.root-servers.net.
.           501531  IN  NS  a.root-servers.net.
.           501531  IN  NS  c.root-servers.net.
.           501531  IN  NS  k.root-servers.net.
.           501531  IN  NS  b.root-servers.net.
.           501531  IN  NS  i.root-servers.net.
.           501531  IN  NS  d.root-servers.net.
.           501531  IN  NS  g.root-servers.net.
.           501531  IN  NS  l.root-servers.net.
.           517068  IN  RRSIG   NS 8 0 518400 20150409170000 20150330160000 16665 . BzguVAWJRGszQChsRtOjy70WLm3b8tLD8UMF2E/+Lpg2DMDsE98I7FEA Wsjt9xk922XISUC87Bw38jToiuthW6XxkMAbXiQvtQylmoNBNjAjNrL6 mZezPNnYLO9shiB+awce1+k/JEivmGoPmo9DW5eBmZ0D0GxfCSczMjae KEM=
;; Received 913 bytes from 127.0.0.1#53(127.0.0.1) in 6 ms

mobi.           172800  IN  NS  a0.mobi.afilias-nst.info.
mobi.           172800  IN  NS  a2.mobi.afilias-nst.info.
mobi.           172800  IN  NS  b0.mobi.afilias-nst.org.
mobi.           172800  IN  NS  b2.mobi.afilias-nst.org.
mobi.           172800  IN  NS  c0.mobi.afilias-nst.info.
mobi.           172800  IN  NS  d0.mobi.afilias-nst.org.
mobi.           86400   IN  NSEC    moda. NS RRSIG NSEC
mobi.           86400   IN  RRSIG   NSEC 8 1 86400 20150409170000 20150330160000 16665 . 1MbFsEBpYrLlxRGsBsktvDt8Qqk7n1ZSPOfpR5H+oMZL+RY0ng4n0azO Bf8ylaCkFryQOPc+LTb8DBwRi9q7eRfBDJp/kZQ/jKZErzWaYqu8GHwj hjDjVCV4rR4LdVSGX9wiXWQB1TZjUOIRO3kdfEiGlxFactSgVeCZdQZ0 QWU=
;; Received 646 bytes from 128.63.2.53#53(h.root-servers.net) in 113 ms

just4bettors.mobi.  86400   IN  NS  ns1.capilleira.com.
just4bettors.mobi.  86400   IN  NS  ns2.capilleira.com.
just4bettors.mobi.  86400   IN  NS  udns1.ultradns.net.
just4bettors.mobi.  86400   IN  NS  udns2.ultradns.net.
;; Received 156 bytes from 199.249.118.1#53(a2.mobi.afilias-nst.info) in 359 ms

desktop.just4bettors.mobi. 38400 IN A   190.171.28.156
desktop.just4bettors.mobi. 38400 IN NS  ns2.capilleira.com.
desktop.just4bettors.mobi. 38400 IN NS  ns1.capilleira.com.
;; Received 152 bytes from 196.40.69.98#53(ns1.capilleira.com) in 1 ms

this last one seems to be as if desktop.just4bettors.mobi is attached to 190.171.28.156 ? so, I still don't get why I can not access to my subdomain.

Nabil Bourenane
  • 755
  • 4
  • 11
Non
  • 138
  • 8

1 Answers1

1

You have to wait DNS propagation, the time depends on the TTL set on your zone file.

https://www.whatsmydns.net/#A/desktop.just4bettors.mobi (Don't know much about this website)

+trace option made you confused because this is how it works:

(man page)

+[no]trace Toggle tracing of the delegation path from the root name servers for the name being looked up. Tracing is disabled by default. When tracing is enabled, dig makes iterative queries to resolve the name being looked up. It will follow referrals from the root servers, showing the answer from each server that was used to resolve the lookup.

At least, your were asking to your DNS server which obviously has the answer: (ns1.capilleira.com.)

dig @196.40.69.98 desktop.just4bettors.mobi A +short
190.171.28.156

But what about the DNS server you're using to browse the web:

(e.g. OpenDNS)

dig @208.67.222.222 desktop.just4bettors.mobi A

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @208.67.222.222 desktop.just4bettors.mobi A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 59389
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;desktop.just4bettors.mobi. IN  A

;; AUTHORITY SECTION:
just4bettors.mobi.  2772    IN  SOA udns1.ultradns.net. pvargas.capilleira.com. 2012062805 10800 3600 2592000 86400

;; Query time: 5 msec
;; SERVER: 208.67.222.222#53(208.67.222.222)
;; WHEN: Tue Mar 31 00:24:32 2015
;; MSG SIZE  rcvd: 119
Nabil Bourenane
  • 755
  • 4
  • 11