> For the complete documentation index, see [llms.txt](https://bothosting-net.gitbook.io/bot-hosting.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bothosting-net.gitbook.io/bot-hosting.net/troubleshooting/server-rate-limits.md).

# Server Rate Limits

Servers may share an outbound IP address with a small number of other servers. This usually includes two to five servers.

Another server’s traffic can sometimes exceed an API provider’s limits. The provider may then temporarily block the shared IP address.

Your console may show an HTML error page from Cloudflare. The message may state that access to `discord.com` is temporarily restricted.

### Resolve shared-IP limits

These blocks are usually temporary and clear automatically.

You can also:

* Configure a proxy for affected requests.
* Request a server transfer if you have a paid plan.

Only members with a paid plan can request a server transfer.

### Detect Discord API rate limits

`discord.js` handles rate limits internally and retries requests automatically. Your console may not show a warning unless you log REST responses.

Listen for REST response events to identify these status codes:

* `403` — access is forbidden.
* `429` — the request is rate limited.

```javascript
client.rest.on(RESTEvents.Response, (request, response) => {
    if (response.status !== 403 && response.status !== 429) return;

    console.log('Discord API request was limited.');
});
```

`client` must be a [Client](https://discord.js.org/docs/packages/discord.js/main/Client:Class) instance. Import [`RESTEvents`](https://discord.js.org/docs/packages/discord.js/main/RestEvents:Interface) from `discord.js`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://bothosting-net.gitbook.io/bot-hosting.net/troubleshooting/server-rate-limits.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
