Skip to main content
Manage Host Headers
Last update:

Manage Host Headers

When a CDN server requests content from a source, it refers to the IP address, not the 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 Host header specifying the domain is used in the server's request to the source.

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 custom Host header

  1. In Control Panel, go to CDNCDN Resources.

  2. Open the CDN resource page.

  3. Open the General tab.

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

  5. In the Host Header Override field, enter your header — the domain name without specifying the protocol. If necessary, you can add a port, such as 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 give a 400 Bad Request or 403 Forbidden Response error.

    Example of a request for validation:

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

    Specify:

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