---
title: "Origins"
description: "Where a distribution sends requests, the addresses it refuses, and the headers your origin receives."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Origins

A distribution has one origin:

| Field | Meaning |
| --- | --- |
| `host` | A hostname, an IPv4 address or an IPv6 address (such as `2001:db8::1`, without brackets) on the internet. A hostname is reached over IPv4 when it has an A record and over IPv6 when it has only AAAA records |
| `protocol` | `https`: the origin's certificate must be valid for `host`, and `host` is sent as SNI. `http`: unencrypted |
| `port` | `443` for `https` and `80` for `http` unless you set one |
| `hostHeader` | `viewer` (default): the visitor's `Host` header. `origin`: `host`, with `:port` when it isn't the protocol's default |

Requests reach the origin over HTTP/1.1. WebSocket upgrades pass through.

## Bucket origins

Instead of those fields, an origin can be `bucket`: the name of an Object Storage bucket in the
same organization, which the distribution reads while the bucket stays private. See
[Serve a private bucket](/cdn/guides/serve-a-private-bucket).

## Refused addresses

An origin must be a public address. An IP address in `host` is refused when you create or change
a distribution; a hostname's addresses are checked every time the CDN looks it up. Refused:

- private addresses (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) and shared address space
  (`100.64.0.0/10`)
- loopback (`127.0.0.0/8`) and link-local (`169.254.0.0/16`)
- documentation, benchmarking, multicast and reserved ranges (`0.0.0.0/8`, `192.0.0.0/24`,
  `192.0.2.0/24`, `198.18.0.0/15`, `198.51.100.0/24`, `203.0.113.0/24`, `224.0.0.0/4`,
  `240.0.0.0/4`)
- IPv6 addresses outside global unicast (`2000::/3`), including unique local (`fc00::/7`),
  link-local (`fe80::/10`), IPv4-mapped and NAT64 addresses, and the documentation, 6to4 and
  Teredo ranges (`2001:db8::/32`, `3fff::/20`, `2002::/16`, `2001::/23`)
- EZGH's own platform addresses

EZGH instances' and load balancers' public addresses, IPv4 and IPv6, are allowed.

## What your origin receives

| Header | Value |
| --- | --- |
| `X-Forwarded-For` | The visitor's address, appended to any the request already had |
| `X-Forwarded-Proto` | `https` |
| `X-Forwarded-Host` | The hostname the visitor asked for |

Requests to your origin come from the CDN's addresses, not the visitor's; read the visitor's from
`X-Forwarded-For`.

## Errors

| Status | When |
| --- | --- |
| `421` | The distribution is disabled, or the `Host` isn't a hostname the connection's certificate covers |
| `502` | The origin can't be reached, its address is refused, or its certificate isn't valid for `host` |
| `504` | The origin didn't answer in time |
| `429` | One visitor address sent too many requests at once or too fast |

Source: https://docs.ezghcloud.com/cdn/origins/index.mdx
