Skip to main content

Manage Host Headers

Last update:

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 Override Host header field. enter your header — the domain name without specifying a protocol. If necessary. you can add a port such as 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 resolved, 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 name without protocol, e.g. example.com;
    • <ip_address> — Source IP address with protocol, e.g. https//:192.168.1.1.