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. In order for the CDN server to request content from the correct domain, a header is used in the server's request to the source. Host indicating the domain.

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

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

Set a custom Host header

  1. In control panel go to CDNCDN resources.

  2. Open the CDN resource page.

  3. Open the tab General.

  4. In the block Content Source click Edit source..

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

  6. Click Save.

  7. 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 an error 400 Bad Request or 403 Forbidden Response.

    Example of a request for validation:

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

    Specify:

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