Title: Test a proxy configuration
Author: WordPress VIP Documentation
Published: May 13, 2022
Last modified: March 25, 2024

---

 1. [Reverse proxy](https://docs.wpvip.com/reverse-proxy/)
 2. Test a proxy configuration

#  Test a proxy configuration

Reverse proxy configurations should be tested extensively prior to a site launch.

## Testing with cURL

A reverse proxy’s settings can be validated by using cURL: `curl -I`

[Default HTTP response headers](https://docs.wpvip.com/change-or-remove-http-headers-added-by-vip-go/)(
e.g., `x-rq`, `x-hacker`, `x-powered-by`) are added by VIP to sites hosted on the
VIP Platform. These headers can be useful for testing a reverse proxy configuration
with a cURL request.

**Note**

If a reverse proxy is stripping out or limiting HTTP headers—or if [headers added by VIP](https://docs.wpvip.com/change-or-remove-http-headers-added-by-vip-go/)
have been intentionally removed from a site—these headers will not be present in
a cURL response. As a result, the presence of VIP’s headers can not be used as a
reliable indicator for the success of a reverse proxy’s configuration.

When the reverse proxy’s settings are in place and ready to test, send a cURL request
to a URI that is expected to be forwarded to VIP.

If the the reverse proxy’s settings are working as expected, headers identifying
both the proxy server and VIP (e.g. `x-powered-by: WordPress VIP <https://wpvip.
com>;`) will be present in the response to the cURL request.

For example, if `example.com` is the proxy server, and the VIP site URL is `example.
com/blog/`, the following command should return headers identifying both the proxy
server and VIP:

    ```wp-block-preformatted
    curl -I https://example.com/blog/ 
    ```

## Testing with a non-production domain

A test domain can be used for configuring and testing a reverse proxy’s settings
by configuring a non-production site with the routes that are intended to be set
in production. For example, a testing domain like `staging.example.com` can be pointed
at a site on a non-production environment to test a reverse proxy that will route
to `staging.example.com/blog/`.

Use the VIP Dashboard to [add the test domain](https://docs.wpvip.com/map-a-domain/)
to the non-production environment, and a [Let’s Encrypt TLS certificate](https://docs.wpvip.com/lets-encrypt-cert/)
for the domain can be installed. Once testing is ready to begin, a [search-replace](https://docs.wpvip.com/search-replace/)
will need to be run on the target VIP site or network site (in the case of multisite)
from the site’s previous domain value to `staging.example.com`. Confirm through 
testing that all reverse proxy configurations are able to successfully route to 
VIP.

Completing this process enables the launching of the production site to only require
the reverse proxy configuration to be updated with the production domain value.

## Testing with a hosts file

Some issues observed on sites with a reverse proxy in front of them require investigation
to determine if the source of the issue is from the reverse proxy layer or the VIP
Platform. This can be determined by [managing the hosts file](https://docs.wpvip.com/domains-tls/managing-your-hosts-file/)
on a user’s local machine and bypassing the reverse proxy layer. If it is not possible
to reproduce the issue with the updated hosts file, the issue is likely to originate
from the reverse proxy layer.

Last updated: March 25, 2024