# Set a default custom HTTP response code

Updated on 07/16/2026 7:28 am PDT

This HTTP provider for Wowza Streaming Engine™ media server software (HttpCustomResponseCode) replaces the default HTTP provider and returns a custom HTTP response code for requests that aren't handled previously. Only the response headers are returned. No content or HTTP body is returned.

> **Note:** The default HTTP provider normally returns the Wowza Streaming Engine software version.

Copy

```
package com.wowza.wms.example;

import com.wowza.wms.http.*;
import com.wowza.wms.vhost.*;

public class HttpCustomResponseCode extends HTTPProvider2Base
{

public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp)
	{
		if (!doHTTPAuthentication(vhost, req, resp))
			return;
		int responseCode = this.properties.getPropertyInt("responseCode", 200);
		resp.setResponseCode(responseCode);
	}
}
```

## Configuration [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode\#configuration "Copy to clipboard"/index.html)

* * *

1. Open the Wowza Streaming Engine **VHost.xml** configuration file **\[ _install-dir_\]/conf/VHost.xml** in a text editor.

2. In **VHost.xml**, locate the default streaming hostport ( **<HostPortList>**/ **<HostPort>**/ **<Name>Default Streaming</Name>**).

3. In this section of the XML file, in the list of HTTP providers ( **<HTTPProviders>**... **</HTTPProviders>**), locate the following HTTP provider configuration section (this is the default HTTP provider):

Copy

```
<HTTPProvider>
   	<BaseClass>com.wowza.wms.http.HTTPServerVersion</BaseClass>
   	<RequestFilters>*ServerVersion</RequestFilters>
   	<AuthenticationMethod>none</AuthenticationMethod>
</HTTPProvider>
```

4. Replace this HTTP provider with the following:

Copy

```
<HTTPProvider>
   	<BaseClass>com.wowza.wms.example.HttpCustomResponseCode</BaseClass>
   	<RequestFilters>*</RequestFilters>
   	<AuthenticationMethod>none</AuthenticationMethod>
   	<Properties>
   		<Property>
   			<Name>responseCode</Name>
   			<Value>404</Value>
   		</Property>
   	</Properties>
</HTTPProvider>
```

You can set the **responseCode** property value to any valid HTTP response status code.

5. Save the **VHost.xml** file, and then restart Wowza Streaming Engine.

Was this article helpful?

[Helpful](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode# "Helpful"/index.html)

Thank you for your feedback!

300 characters remaining

Name

Email

reCAPTCHA

Recaptcha requires verification.

I'm not a robot

reCAPTCHA

[Submit](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode# "Submit comment"/index.html)

Thank you for providing feedback to help us improve our documentation!

##### Popular Video Topics [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode\#popular-video-topics "Copy to clipboard"/index.html)

- [The Future of Video Tech](/content/blog/future-of-video-technology/index.html)
- [Streaming Starter Guide](/content/blog/complete-guide-to-live-streaming/index.html)
- [Live Event Streaming Guide](/content/blog/live-event-streaming-guide/index.html)
- [Interactive Streaming Guide](/content/blog/low-latency-streaming-technologies-the-key-to-interactive-video/index.html)
- [Streaming Protocols](/content/blog/streaming-protocols/index.html)
- [Transcoding](/content/blog/what-is-transcoding-and-why-its-critical-for-streaming/index.html)
- [Low Latency](/content/blog/what-is-low-latency/index.html)
- [Security](/content/blog/secure-video-streaming/index.html)

##### Video Resources [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode\#video-resources "Copy to clipboard"/index.html)

- [APIs & SDKs](/content/docs/wowza-developer-apis-and-sdks/index.html)
- [Developer IDE](/content/docs/how-to-extend-wowza-streaming-engine-using-the-wowza-ide/index.html)
- [Test Players](/content/testplayers/index.html)
- [Wowza System Status](https://status.wowza.com/)

##### Partners [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode\#partners "Copy to clipboard"/index.html)

- [Partners Overview](/content/partners/index.html)
- [Find a Partner](/content/partners/preferred-international-resellers/index.html)
- [Channel Program](/content/partners/channel-partner-program/index.html)
- [OEM Program](/content/partners/oem/index.html)
- [Partner Portal](/content/partners/resources/index.html)

##### Company [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode\#company "Copy to clipboard"/index.html)

- [About Us](/content/company/index.html)
- [Blog](/content/blog/category/blog/index.html)
- [News](/content/news/index.html)
- [Events & Webinars](/content/company/events/index.html)
- [Careers](/content/careers/index.html)
- [Customers](/content/customers/index.html)
- [Contact Us](/content/contact/index.html)

##### Stay Connected [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode\#stay-connected "Copy to clipboard"/index.html)

##### Stay Up to Date with the Blog [Copy to clipboard](/content/docs/how-to-set-a-default-custom-http-response-code-httpcustomresponsecode\#stay-up-to-date-with-the-blog "Copy to clipboard"/index.html)

Email

X - Form Filled Type

© 2007–2025 Wowza Media Systems™, LLC. All rights reserved.   [Security & Privacy Policy](/content/legal/privacy/index.html) \| [Legal](/content/legal/index.html) \| [System Status](https://status.wowza.com/)

reCAPTCHA
