# Error code 502

<figure><img src="/files/PwKP8VNRkh39QQfNfwtO" alt=""><figcaption></figcaption></figure>

This issue indicates that the Web Application Firewall (WAF) cannot connect to the backend application server. To resolve this, verify the protocol used by the WAF to reach the backend server or whitelist the WAF IPs on the backend server.

Follow these steps to change the protocol:

1. Log in to the Prophaze Dashboard.
2. Navigate to the Settings tab.
3. Click the edit icon next to the domain name for which you want to make changes.
4. Check the endpoint and protocol.

Make sure to save any changes to apply the new settings.

<figure><img src="/files/rKm6cIiNXvozrWtTbKoK" alt=""><figcaption></figcaption></figure>


---

# 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.prophaze.com/troubleshooting-queries/error-code-502.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.
