> For the complete documentation index, see [llms.txt](https://docs.tvheadend.org/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tvheadend.org/documentation/https-access-via-reverse-proxy.md).

# HTTPS access via Reverse Proxy

In order to access Tvheadend behind a reverse proxy server and still be able to stream services or recordings, it is necessary for the reverse proxy server to add or modify some headers in the HTTP request forwarded to TVH.

### X-Forwarded-Proto:

Tvheadend currently (as at April 2025) only supports the HTTP protocol natively.  To access TVH via HTTPS, an external reverse proxy server is required to convert the incoming HTTPS request to HTTP and forward it to TVH.

In order for TVH to recognise that it is operating behind a HTTPS reverse proxy server, the proxy server must be configured to add the `X-Forwarded-Proto: https` header to the request forwarded to TVH.

Adding this header will ensure that documents that contain a TVH URL, such as `M3U` files, will be prefixed with correct protocol identifier.

### Host: / X-Forwarded-Host:

The public-facing host name, port number and path returned by TVH within documents such as an `M3U` can also be modified.  As TVH only recognises the `X-Forwarded-Host:`header when the `Host:`header is not present, it is recommended that only the `Host:`header be modified by the proxy in for following format:

`Host: <External host>[:<External port>][/<External path>]`


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tvheadend.org/documentation/https-access-via-reverse-proxy.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
