Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud CDN
  • Getting started
    • All guides
      • Creating a resource
      • Copying configuration from one resource to another
      • Updating basic settings of a resource
      • Getting information about a resource
      • Configuring resource caching
      • Configuring log export
      • Prefetching files to CDN servers
      • Purging resource cache
      • Configuring request and response headers
      • Configuring CORS for responses to clients
      • Configuring HTTP methods
      • Setting up an HTTP response
      • Enabling file compression
      • Enabling file segmentation
      • Enabling origin shielding
      • Setting up a request redirect
      • Enabling a resource to follow request redirects
      • Setting up hiding of origin headers
      • Setting up access via a secure token
      • Setting up location rules
      • Disabling a resource
      • Managing resource labels
      • Configuring dedicated IP addressing
      • Configuring a TLS profile
      • Deleting a resource
      • Viewing resource statistics
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Request logs
  • Audit Trails events
  • Release notes
  • Troubleshooting

In this article:

  • Setting up a redirect
  • Setting a response content
  1. Step-by-step guides
  2. Resources
  3. Setting up an HTTP response

Setting up HTTP responses

Written by
Yandex Cloud
Updated at April 13, 2026
  • Setting up a redirect
  • Setting a response content

A CDN resource can return a particular HTTP code and content instead of a standard response to all requests.

HTTP responses can be set up either globally or for a particular URI in location rules.

Setting up a redirectSetting up a redirect

Management console
REST API
gRPC API
  1. In the management console, select the folder where your resource is located.

  2. Go to Cloud CDN.

  3. Click the resource name.

  4. Navigate to the HTTP headers and methods tab.

  5. In the top-right corner, click Edit.

  6. Under Response settings, enable Custom HTTP response.

  7. In the Response type field, select Configure redirect.

  8. Specify a response code.

    The following codes are supported: 301, 302, 303, 307, and 308.

  9. Specify a URL to redirect user requests to.

  10. Click Save.

To enable the option, add the staticResponse section when using the create or update method for a Resource:

"staticResponse": {
  "enabled": "<true_or_false>",
  "code": "string",
  "content": "string"
}

Where:

  • enabled: Enabling the option:

    • true enables the option.
    • false disables the option.
  • code: Response code.

    The following codes are supported: 301, 302, 303, 307, and 308.

  • content: Specify a URL to redirect user requests to.

To enable the option, add the static_response section when using the ResourceService/Create or ResourceService/Update call:

"static_response": {
  "enabled": "<true_or_false>",
  "code": "string",
  "content": "string"
}

Where:

  • enabled: Enabling the option:

    • true enables the option.
    • false disables the option.
  • code: Response code.

    The following codes are supported: 301, 302, 303, 307, and 308.

  • content: Specify a URL to redirect user requests to.

It may take up to 15 minutes for the new settings of the existing resource to apply to the CDN servers. After that, we recommend purging the resource cache.

Setting a response contentSetting a response content

Management console
REST API
gRPC API
  1. In the management console, select the folder where your resource is located.

  2. Go to Cloud CDN.

  3. Click the resource name.

  4. Navigate to the HTTP headers and methods tab.

  5. In the top-right corner, click Edit.

  6. Under Response settings, enable Custom HTTP response.

  7. In the Response type field, select Set response content.

  8. Specify a response code.

    Codes from the HTTP Status Code Registry are supported, except for those having Unassigned in the description.

  9. Specify JSON, HTML, or plain text you need to return to the client in the response body.

  10. Click Save.

To enable the option, add the staticResponse section when using the create or update method for a Resource:

"staticResponse": {
  "enabled": "<true_or_false>",
  "code": "string",
  "content": "string"
}

Where:

  • enabled: Enabling the option:

    • true enables the option.
    • false disables the option.
  • code: Response code.

    Codes from the HTTP Status Code Registry are supported, except for those having Unassigned in the description.

  • content: JSON, HTML, or plain text you need to return to the client in the response body.

To enable the option, add the static_response section when using the ResourceService/Create or ResourceService/Update call:

"static_response": {
  "enabled": "<true_or_false>",
  "code": "string",
  "content": "string"
}

Where:

  • enabled: Enabling the option:

    • true enables the option.
    • false disables the option.
  • code: Response code.

    Codes from the HTTP Status Code Registry are supported, except for those having Unassigned in the description.

  • content: JSON, HTML, or plain text you need to return to the client in the response body.

It may take up to 15 minutes for the new settings of the existing resource to apply to the CDN servers. After that, we recommend purging the resource cache.

Was the article helpful?

Previous
Configuring HTTP methods
Next
Enabling file compression
© 2026 Direct Cursus Technology L.L.C.