# Blocking User-Agent

Blocking a User-Agent is straightforward. You just need to add these lines to your configuration file within the vcl\_recv function and customize it according to your needs.

```javascript
sub vcl_recv{
    if (req.http.User-Agent ~ "^curl") { 
        call deny_request;
    } 
}
```

In this example, any request with a User-Agent starting with the word curl will be denied with a 403 Forbidden response. The 403 response is triggered by calling `deny_request` which blocks the requests immediatel&#x79;**.**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.transparentedge.eu/security/block-by-ua.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
