> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : Query varnishlogs for requests with 404 responses
- URL: https://kudithipudi.org/how-to-query-varnishlogs-for-requests-with-404-responses/
- Published: 2016-02-01T23:33:28.000Z
- Updated: 2016-02-01T23:33:28.000Z
- Description: varnishlog, one of the tools provided with varnish cache, uses VSL Query Expressions (https://www.varnish-cache.org/docs/trunk/reference/vsl-query.html) to provide some powerful insights into the requests and responses. Here is...
- Author: admin
- Tags: HOWTO, Linux, Networking, Technology, Uncategorized, Web, howto, tips, varnish, #wp, #wp-post, #Import 2026-08-23 02:32

varnishlog, one of the tools provided with varnish cache, uses VSL Query Expressions (https://www.varnish-cache.org/docs/trunk/reference/vsl-query.html) to provide some powerful insights into the requests and responses.

Here is a how you can use varnishlog to show all client requests that are ending up with a 404 response.

sudo varnishlog -g request -i ReqURL -q "BerespStatus != 200"

Technically, this particular query shows all client requests with a response other than 200.

Breaking down the commands

**\-g request** : shows all entries related to the request

**\-i ReqURL** : forces varnishlog to only display the Requesting URL

**\-q “BerespStatus != 200”** : query filter to only match non 200 responses. Note that the query has to be enclosed in “”.