---
title: setDefaultBackend
summary: Set the default backend to use when dynamic backends are disabled.
url: https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/experimental/fn.setDefaultBackend/
---

**Kind:** Function  
**Module:** [experimental](https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/experimental/)  
**Package:** @fastly/js-compute 4.0.1  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/experimental.d.ts#L30

> **DEPRECATED:** Use enforceExplicitBackends instead.

```javascript
setDefaultBackend(backend: string): void
```

Set the default backend to use when dynamic backends are disabled.

For backwards compatibility, unless `allowDynamicBackends` has been explicitly
called before invoking this function, it will disable dynamic backends when
it is called, as if calling `allowDynamicBackends(false)`.

**Parameters**

- `backend`: `string` — The name of the default backend.

**Returns**

`void`
