Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Cloud CDN
  • Getting started
    • Service overview
    • Resource
    • Origins and origin groups
      • Overview
      • Host header
      • Content segmentation
      • Origin shielding
    • Redirecting requests
    • Content caching
    • Secure tokens
    • IP-based access policy
    • Log export
    • Labels
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • Troubleshooting
  1. Concepts
  2. Exchanging data between the CDN and origins
  3. Host header

Host header in CDN server requests to origins

Written by
Yandex Cloud
Updated at October 29, 2024

To make sure that CDN servers send correct requests to origins, configure the Host HTTP header value for these requests:

  • Primary domain name: First domain name for content distribution specified in the CDN resource settings.
  • Custom: Arbitrary domain name.
  • Match client: Same value as the Host header value in the client request to CDN.

The Host header value is selected when creating a resource. You can change it afterwards along with other basic resource settings. For more information, see these guides:

  • Creating a resource
  • Editing the basic settings of a resource

How to set up the header properlyHow to set up the header properly

Choosing the correct setting for the Host header depends on the origins you use in your resource:

A single origin
Origin group

If the origin is a bucket, select the Custom option and specify <bucket_name>.storage.yandexcloud.net as the value. If the bucket is configured for static website hosting, specify <bucket_name>.website.yandexcloud.net.

In other cases, the setting depends on what requests the origin accepts.

For example, in blue-green and canary deployment scenarios, the L7 load balancer is configured to accept requests with two values of the Host header. For the CDN resource, the Match client option is selected.

To check that the origin accepts requests with the selected Host header value correctly, run this command:

curl \
  --head \
  --insecure \
  --header "Host: <header_value>" <address_of_server_or_L7_load_balancer>

If there is one bucket in the group:

  1. Select the Custom option and specify <bucket_name>.storage.yandexcloud.net as the value. If the bucket is configured for static website hosting, specify <bucket_name>.website.yandexcloud.net.
  2. Configure other origins (servers and L7 load balancers) so that they accept requests with the specified header value.

If there are multiple buckets in the group, we recommend using the L7 load balancer with buckets that act as backends instead (see the configuration example for blue-green and canary deployment).

In other cases, the setting depends on what requests the origins accept. To check that the origin accepts requests with the selected Host header value correctly, run this command:

curl \
  --head \
  --insecure \
  --header "Host: <header_value>" <address_of_server_or_L7_load_balancer>

Was the article helpful?

Previous
Overview
Next
Content segmentation
Yandex project
© 2025 Yandex.Cloud LLC