# HTTP Path Rewrites

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [streaming-full.txt](https://docs.redpanda.com/streaming-full.txt)

---
title: HTTP Path Rewrites
latest-operator-version: v26.1.4
# EOL = End-of-Life (support lifecycle status)
page-is-nearing-eol: "false"
page-is-past-eol: "true"
page-eol-date: December 22, 2024
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
docname: console/http-path-rewrites
page-component-name: streaming
page-version: "23.3"
page-component-version: "23.3"
page-component-title: Streaming
page-relative-src-path: console/http-path-rewrites.adoc
page-edit-url: https://github.com/redpanda-data/docs/edit/v/23.3/modules/manage/pages/console/http-path-rewrites.adoc
description: Learn how you can configure Redpanda Console to comply with your URL rewrites.
page-git-created-date: "2023-06-02"
page-git-modified-date: "2024-02-26"
support-status: past end-of-life
---

<!-- Source: https://docs.redpanda.com/streaming/23.3/manage/console/http-path-rewrites.md -->

If you want to host Redpanda Console under a sub-path rather than the root path, you need to configure HTTP path rewrites. HTTP path rewrites allow you to serve Redpanda Console under a sub-path of your domain, rather than from the root. For example, you may want to have Redpanda Console accessible from `https://my-company.com/redpanda/console`, instead of directly from `https://my-company.com`. This type of configuration is often necessary when:

-   You have multiple services and applications running under the same domain.

-   Redpanda Console is behind a reverse proxy. The proxy might add a path prefix based on routing rules. In this scenario, Redpanda Console needs to know about this prefix to handle requests.


> 📝 **NOTE**
>
> If you host Redpanda Console at a root path, for example under a sub-domain such as `https://console.redpanda.my-company.com`, you don’t need to configure HTTP path rewrites.

## [](#configuration)Configuration

To configure HTTP path rewrites, you must edit the following properties:

-   `basePath`: Set the sub-path under which Redpanda Console is hosted.

-   `setBasePathFromXForwardedPrefix`: Tell Redpanda Console to check the `X-Forwarded-Prefix` header for a prefix.

-   `stripPrefix`: Remove the prefix from the request path before internal routing.


These properties are defined in the `server` object:

```yaml
server:
  # basePath is the sub-path under which Console will be hosted.
  # If you have a reverse proxy in front of Console, that sets
  # the `X-Forwarded-Prefix` header and the configuration property
  # setBasePathFromXForwardedPrefix is true, you don't need to set
  # this.
  basePath: ""

  # If true, Console will check the `X-Forwarded-Prefix` header
  # on all incoming requests. If the header is present, its value
  # will be used as path prefix.
  setBasePathFromXForwardedPrefix: true

  # Some reverse proxies, such as Traefik,
  # can remove a prefix from the URL path before forwarding it to
  # downstream services like Console. If a prefix is set, it must be
  # removed at some point before reaching Console's internal routing.
  # We recommend that only one part of the stack removes the
  # prefix. If you are using a reverse proxy that modifies the
  # request path, you should either disable stripPrefix or
  # configure the proxy so it doesn't modify the path of a request.
  stripPrefix: true
```

## [](#proxy-rewrites)Proxy rewrites

If you have a reverse proxy between Redpanda Console and Kafka Connect, ensure that any rewrite rules include `expand` parameters in the query string. These parameters are necessary for Kafka Connect to return the correct details about the connector:

`://<kafka_connect_host>:8083/connectors?expand=info&expand=status`

## Suggested labs

-   [Enable Unified Identity with Azure Entra ID for Redpanda and Redpanda Console](https://docs.redpanda.com/labs/docker-compose/oidc/)

[Search all labs](https://docs.redpanda.com/labs)