Wireshark’s dns.qry.name display filter reveals the domain requested in a DNS query, making it easier to trace lookups in a packet capture. See how the QNAME field differs from record type, class, and response flags—and why that small distinction helps make network traffic clearer.

Multiple Choice

Which display filter isolates DNS query names?

Isolating the domain being queried in DNS messages comes from filtering on the QNAME field in the DNS Question section. The display filter dns.qry.name points to that domain name—the actual name the client is asking about in a query. So using something like dns.qry.name == www.example.com shows only packets where a DNS query is for that domain. This is different from the other filters: dns.flags.response distinguishes between queries and responses, not the name itself; dns.qry.type selects the type of record requested (A, AAAA, MX, etc.); and dns.qry.class filters by the DNS class (usually IN). The query name filter is the direct way to focus on which domain is being looked up.

Finding DNS Query Names in Wireshark

A DNS lookup often starts with a simple question: what name is a device trying to find? In Wireshark, the display filter dns.qry.name brings that name into focus. It points to the query name—the domain listed in the DNS message’s Question section, such as www.example.com.

That small field can make a busy packet capture much easier to read. Instead of scanning every DNS packet by eye, you can narrow the display to messages that mention a particular domain. The key is knowing what the field represents, and what it doesn’t.

What the query name tells you

When a device needs the address for a website or service, it commonly asks a DNS resolver to look up a domain name. The request includes a question: “What information do you have about this name?” The name in that question is called the QNAME.

In Wireshark, dns.qry.name is the display-filter field for that value. For example:


dns.qry.name == "www.example.com"

This filter displays DNS packets whose query-name field matches www.example.com. It’s a direct way to find requests associated with a particular hostname in a capture.

The distinction between a domain name and the answer matters. A client may ask about www.example.com, but the response might contain an IP address, a canonical name, or other DNS data. The query name tells you what name was asked about—not necessarily what address was returned.

A quick tour of the DNS question

Open a DNS packet in Wireshark and expand the Domain Name System details. In a query, the Question section typically shows three useful pieces of information:

  • Name: the domain being looked up

  • Type: the kind of record requested, such as A or AAAA

  • Class: the DNS class, most often IN for Internet

These fields answer different questions. The query name says which name the client asked about. The type says what kind of information it requested. The class identifies the group of records involved.

Think of it like a note sent to an information desk. The name is the subject of the request; the type is the sort of detail being requested. Mixing those up can lead to a filter that looks plausible but answers the wrong question.

Narrow the display to one domain

For a single hostname, use an equality filter:


dns.qry.name == "www.example.com"

To find names that contain a particular string, a contains filter can be more useful:


dns.qry.name contains "example"

That can help when a capture includes several related hostnames, such as api.example.com and images.example.com. Keep in mind that a broad text match may also include names you didn’t intend to catch, so inspect the results rather than treating the filter as a complete conclusion.

Wireshark’s display filters affect which packets appear in the packet list; they don’t remove packets from the capture file. Clear the filter and the rest of the captured traffic is still there. This is handy when you want to focus for a moment, then return to the wider network conversation.

Query name isn’t the same as query

Here’s a subtle point: dns.qry.name identifies the question name, but it does not, by itself, guarantee that every displayed packet is a DNS request. DNS responses often repeat the original question in their Question section. As a result, a response packet may also have a dns.qry.name field.

If you want to show only DNS queries for a domain, combine the name filter with the response flag:


dns.qry.name == "www.example.com" && dns.flags.response == 0

The expression dns.flags.response == 0 selects DNS messages marked as queries. A value of 1 marks responses. Combining the two filters is like asking for both the subject of the conversation and the direction of the message.

This distinction can matter when you’re tracing a lookup. Seeing the request and response together gives useful context: the client asked for a name, and the resolver replied. But if you’re investigating only what a client requested, the extra flag keeps the view focused.

Don’t confuse the nearby fields

Several DNS fields can look equally tempting in the filter bar. They each reveal a different part of the exchange.

dns.flags.response separates queries from responses. It doesn’t tell you which domain was requested.

dns.qry.type identifies the requested record type. For instance, an A query asks for an IPv4 address, while an AAAA query asks for an IPv6 address. A query for MX records concerns mail routing. These values help explain what kind of data the client wants, not which name it asked about.

dns.qry.class identifies the question class, commonly IN. That can be useful in specialized captures, but it usually won’t distinguish one hostname from another.

When the goal is to identify the domain being queried, dns.qry.name is the field to reach for. The other fields add context; they aren’t substitutes for the name itself.

Build a more useful filter

You can combine the query name with the requested record type. For example:


dns.qry.name == "example.com" && dns.qry.type == 1

Here, type 1 represents an A record. Wireshark can also display DNS type names in packet details, which makes it easier to confirm what a numeric value means. A combined filter can help distinguish an IPv4 lookup from an IPv6 lookup or another kind of DNS request.

If a filter returns nothing, check the spelling and the exact hostname first. A capture may contain www.example.com rather than example.com, or it may show a subdomain you didn’t expect. Also confirm that DNS traffic is actually present. Some applications use encrypted DNS methods, or rely on cached answers, so a particular lookup may not appear as a familiar plaintext DNS exchange in the capture.

That’s a useful reminder: a filter can only show what the capture contains. Wireshark isn’t missing a name if no matching packet was recorded; the traffic may simply have taken another path.

A small field with a clear job

DNS packets carry several layers of information, and the query name is one of the most immediately useful. It connects a network exchange to a human-readable domain, making it easier to follow a client’s activity and understand what a resolver is being asked to find.

Use dns.qry.name when you want to focus on the name in the DNS Question section. Add dns.flags.response == 0 when you need requests only, and bring in dns.qry.type when the requested record type matters too. Each filter has its own job. Once those roles are clear, DNS traffic becomes much less of a blur—and a lot easier to interpret.