Skip to main content
Manage Host Headers
Last update:

Manage Host Headers

When a CDN server requests content from a source, it refers to an IP address, not a domain name. Multiple domains can point to the same IP address. To ensure that the CDN server requests content from the correct domain, the server's request to the source uses a Host header specifying the domain.

By default, when creating a CDN resource, the Host header is set to Auto: requests specify the domain from which the request came.

To explicitly set the desired domain using the Host header,set your Host header.

Set a custom Host header

  1. In the Control Panel, on the top menu, click Products and select CDN.

  2. Open the CDN resource page → General tab.

  3. In the Content Source block, click Edit Source.

  4. In the Host header override field, enter your own header — the domain name without specifying the protocol. If necessary, you can add a port, for example, example.com:443.

  5. Click Save.

  6. Check that the header value is resolved on the side of your web server where the domain content resides. If the header is not allowed, the request will return a 400 Bad Request or 403 Forbidden Response error.

    Example of a request for validation:

    $ curl -H "Host: <domain>" -I <ip_address>

    Specify:

    • <domain> — domain without a protocol;
    • <ip_address> — IP address of the source with protocol.