> For the complete documentation index, see [llms.txt](https://clients.medianova.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/origin-settings/advanced-origin-settings.md).

# Advanced Origin Settings

Configure advanced origin routing for CDN requests using URI match rules and custom origin connection settings.

Configure request-based origin routing for CDN Resources that use **My origin** as their content source.

Advanced Origin Settings route selected requests to custom origins based on a file extension or directory. Each rule defines the requests to match and the origin configuration to use for those requests.

You can manage Advanced Origin Settings in the [Medianova Control Panel](https://cloud.medianova.com/) or via the [API](https://clients.medianova.com/api-documentation/performance-cdn/origin-settings).

{% hint style="info" %}
**Origin Settings** is available for CDN Resources that use **My origin** as the content source. The section is not displayed when **Object storage** is selected.
{% endhint %}

## Configure Advanced Origin Settings

To create an origin routing rule:

{% stepper %}
{% step %}

### Open Origin Settings

Open your CDN Resource and select **Origin Settings**.
{% endstep %}

{% step %}

### Add an Origin Setting

In **Advanced Origin Settings**, select **Add setting**.
{% endstep %}

{% step %}

### Select the URI Match Mode

Select how the request URI is matched:

* **File extension** – Match requests by file extension.
* **Directory** – Match requests by directory.

Enter the corresponding value in **URI Match Rule**.
{% endstep %}

{% step %}

### Configure the Origin

Configure the origin that should receive matching requests:

* **Protocol** – Select **HTTP**, **HTTPS**, or **Same as request**.
* **Domain or IP** – Enter the domain name or IP address of the origin.
* **HTTP Port** – Enter the HTTP port. The default value is `80`.
* **HTTPS Port** – Enter the HTTPS port. The default value is `443`.
* **Host Header** – Enter a custom Host header if required by the origin.
* **Origin SNI request** – Enter the domain to use for SNI when establishing an HTTPS connection to the origin, if required.
  {% endstep %}

{% step %}

### Add the Setting

Select **Add setting** to add the configuration to the Advanced Origin Settings list.
{% endstep %}

{% step %}

### Save the Configuration

Select **Save** in the pending changes bar.

Review the pending changes and confirm the update to apply the configuration to the CDN Resource.
{% endstep %}
{% endstepper %}

## Manage Origin Settings

Configured rules are displayed in the **Advanced Origin Settings** table with their URI match configuration, target origin, and priority.

To modify or remove an existing setting, use the available actions for that setting. After making changes, select **Save** in the pending changes bar and confirm the update.

## Origin Routing Behavior

Advanced Origin Settings evaluate requests against the configured URI match rules.

When a request matches a rule, the CDN uses the origin configuration associated with that rule. The origin configuration can define the protocol, domain or IP address, ports, Host header, and SNI value used for the origin connection.

If no Advanced Origin Settings rule matches the request, the CDN uses the resource's default origin configuration.

## Streaming Content Caching

For **Streaming Content Caching** resources, Advanced Origin Settings use **Origin groups** and **URI match rules**.

An Origin Group defines one or more origins that can handle requests. URI match rules associate a file extension or directory with an Origin Group.

{% hint style="info" %}
Create an Origin Group before configuring a URI match rule.
{% endhint %}

## Create an Origin Group

Create an Origin Group and configure the origins that belong to it.

{% stepper %}
{% step %}

### Add an Origin Group

In **Origin groups**, select **Add group**.
{% endstep %}

{% step %}

### Configure the Origin Group

Configure the group and origin connection:

* **Group name** – Enter a name for the Origin Group.
* **Protocol** – Select **HTTP**, **HTTPS**, or **Same as request**.
* **Domain or IP** – Enter the domain name or IP address of the origin.
* **HTTP Port** – Enter the HTTP port. The default value is `80`.
* **HTTPS Port** – Enter the HTTPS port. The default value is `443`.
* **Host Header** – Enter a custom Host header if required by the origin.
* **Weight** – Define the weight assigned to the origin.
* **Priority** – Select **Primary** or **Standby** to define the origin role.
  {% endstep %}

{% step %}

### Add the Origin Group

Select **Add group** to add the Origin Group.
{% endstep %}

{% step %}

### Save the Configuration

Select **Save** in the pending changes bar.

Review the pending changes and confirm the update to apply the configuration to the CDN Resource.
{% endstep %}
{% endstepper %}

## Configure a URI Match Rule

After creating an Origin Group, configure a URI match rule to route matching requests to that group.

{% stepper %}
{% step %}

### Add a Rule

In **URI match rules**, select **Add rule**.
{% endstep %}

{% step %}

### Define the URI Match Rule

Select a **URI Match Mode**:

* **File extension** – Matches requests by file extension.
* **Directory** – Matches requests by directory.

Enter the value to match in **URI Match Rule**.
{% endstep %}

{% step %}

### Select the Origin Group

Select the **Origin Group** that should handle requests matching the rule.
{% endstep %}

{% step %}

### Add the Rule

Select **Add setting** to add the URI match rule.
{% endstep %}

{% step %}

### Save the Configuration

Select **Save** in the pending changes bar.

Review the pending changes and confirm the update to apply the configuration to the CDN Resource.
{% endstep %}
{% endstepper %}

## Related Concepts

* [Origin SNI Request](/products/performance-cdn/static-content-delivery/advanced-configuration/origin-settings/origin-sni-request.md)
* [Origin Settings API](https://clients.medianova.com/api-documentation/performance-cdn/origin-settings)


---

# 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://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/origin-settings/advanced-origin-settings.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.
