---
title: return
summary: null
url: https://www.fastly.com/documentation/reference/vcl/statements/return
---

**Available in:** all subroutines

Terminates a subroutine and sets the return state.

```vcl
return(lookup);
```

The return states available vary by [subroutine](https://www.fastly.com/documentation/reference/vcl/subroutines). `return` can also be used to terminate custom subroutines and pass control back to the parent if used without a parameter. For example, the following code will set the header `custom_header` to "Hello big world":

```vcl
sub my_custom_sub {
  set req.http.custom_header += "big ";
  return;
  set req.http.custom_header += "wide "; # Does not run
}

sub vcl_recv {
  set req.http.custom_header = "Hello ";
  call my_custom_sub;
  set req.http.custom_header = "world."; # Runs because the `return` statement in my_custom_sub did not specify a return state
}
```
