title: Why is the content of QNAME field NOT the original domain in a DNS message?
body: <p>Why is the content of QNAME field <strong>NOT</strong> the original domain in a DNS message?</p>
  <p>For example, if I want to get the IP of domain <code>www.mydomain.com</code>, I will send a DNS lookup package to the network, and the package's question section contains the domain.</p>
  <p>But actually <strong>the content of QNAME in the package</strong> is <strong><code>3www8mydomain3com0</code></strong> instead of <code>www.mydomain.com</code>.</p>
  <p><code>3www8mydomain3com0</code> means every label begin with the length of this part and then content, end with length of 0.</p>
  <p>So, Why do we use length+data pattern to describe a domain rather than original domain?</p>
  <p>Have a look at this section <code>4.1.2. Question section format</code>describes how we define the domain record on <a href="https://www.rfc-editor.org/rfc/rfc1035" rel="nofollow noreferrer">RFC1035</a> (Please search to see this section).</p>