Cloudflare Docs
Cloudflare for Platforms
Cloudflare for Platforms
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Custom origin server

A custom origin server lets you send traffic from one or more custom hostnames to somewhere besides your default proxy fallback, such as:

  • goes to
  • goes to

​​ Requirements

To use a custom origin server, you need to meet the following requirements:

  • You have purchased the Cloudflare for SaaS Enterprise plan and the feature is properly entitled to your account.
  • Each custom origin needs to be a valid hostname with a proxied (orange-clouded) A, AAAA, or CNAME record in your account’s DNS. You cannot use an IP address.
  • The DNS record for the custom origin server does not currently support wildcard values.

​​ Use a custom origin

To use a custom origin, select that option when creating a new custom hostname in the dashboard or include the "custom_origin_server": your_custom_origin_server parameter when using the API POST command.

​​ SNI rewrites

When Cloudflare establishes a connection to your default origin server, the Host header and SNI will both be the value of the original custom hostname.

However, if you configure that custom hostname with a custom origin, the value of the SNI will be that of the custom origin and the Host header will be the original custom hostname. Since these values will not match, you will not be able to use the Full (strict) on your origins.

To solve this problem, you can contact your account team to request an entitlement for SNI rewrites.

​​ SNI rewrite options

Choose how your custom hostname populates the SNI value with SNI rewrites:

  • Origin server name (default): Set SNI to the custom origin

    • If custom origin is, then the SNI is
  • Host header: Set SNI to the host header (or a host header override)

    • If wildcards are not enabled and the hostname is, then the SNI is
    • If wildcards are enabled, the hostname is, and a request comes to, then the SNI is
  • Subdomain of zone: Choose what to set as the SNI value (custom hostname or any subdomain)

    • If wildcards are not enabled and a request comes to, choose whether to set the SNI as or
    • If wildcards are enabled, you set the SNI to, and a request comes to, then the SNI is

​​ Set an SNI rewrite

To set an SNI rewrite in the dashboard, choose your preferred option from Origin SNI value when creating a custom hostname.

To set an SNI rewrite via the API, set the custom_origin_sni parameter when creating a custom hostname:

  • Custom origin name (default): Applies if you do not set the parameter
  • Host header: Specify ":request_host_header:"
  • Subdomain of zone: Set to "" or another subdomain of the custom hostname