Error map

1040 Cloudflare Error 1040 / 1041: Invalid request header modification

Cloudflare · layer 3, Edge & web server

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

1040 — Cloudflare Error 1040 / 1041: Invalid request header modification (Cloudflare)1040CORS — CORS Error: No 'Access-Control-Allow-Origin' header is present (API)CORSsession_start() — Warning: session_start(): Session cannot be started after headers have already been sent (PHP)session_start()411 — HTTP 411 Length Required (HTTP)411BOM output — Unexpected characters at the top of the page / headers already sent by BOM (PHP)BOM output100 — HTTP 100 Continue (HTTP)1001035 — Cloudflare Error 1035 / 1036: Invalid request rewrite (invalid URI path / query string) (Cloudflare)1035Headers already sent — Warning: Cannot modify header information - headers already sent (PHP)Headers already sentCSP violation — Refused to load the script because it violates the following Content Security Policy directive (JavaScript)CSP violation103 — HTTP 103 Early Hints (HTTP)103417 — HTTP 417 Expectation Failed (HTTP)4171037 — Cloudflare Error 1037: Invalid rewrite rule (failed to evaluate expression) (Cloudflare)1037428 — HTTP 428 Precondition Required (HTTP)428AccessDenied — AWS S3: AccessDenied (403) when calling GetObject / PutObject (AWS)AccessDenied401 — HTTP 401 Unauthorized (HTTP)401403 — HTTP 403 Forbidden (HTTP)403ExpiredToken — AWS: ExpiredToken — The security token included in the request is expired (AWS)ExpiredTokensession save path — Warning: session_start(): open(/var/lib/php/sessions/sess_x, O_RDWR) failed: Permission denied (PHP)session save path416 — HTTP 416 Range Not Satisfiable (HTTP)416400 — HTTP 400 Bad Request (HTTP)400413 — HTTP 413 Content Too Large (Request Entity Too Large) (HTTP)413parameter_missing — API Error: Missing required parameter (parameter_missing / "x" is required) (API)parameter_missingURIError — URIError: URI malformed (JavaScript)URIErrorUnicodeEncodeError — UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' (Python)UnicodeEncodeError505 — HTTP 505 HTTP Version Not Supported (HTTP)505Link expired — WordPress: The link you followed has expired (WordPress)Link expiredfile_type_not_allowed — Upload error: File type not allowed / unsupported file type (API)file_type_not_allow…1000 — Cloudflare Error 1000: DNS points to prohibited IP (Cloudflare)10001001 — Cloudflare Error 1001: DNS resolution error (Cloudflare)10011002 — Cloudflare Error 1002: DNS points to Prohibited IP / Restricted (Cloudflare)1002500 — HTTP 500 Internal Server Error (HTTP)500Call to undefined function — PHP Fatal error: Uncaught Error: Call to undefined function (PHP)Call to undefined f…Undefined array key — Warning: Undefined array key / Undefined index (PHP)Undefined array keyMixed Content — Mixed Content: The page was loaded over HTTPS, but requested an insecure resource (API)Mixed Contentblocked a frame — SecurityError: Blocked a frame with origin "x" from accessing a cross-origin frame. (JavaScript)blocked a frameScript error. — Script error. (at line 0) — cross-origin error details hidden (JavaScript)Script error.504 — HTTP 504 Gateway Timeout (HTTP)504524 — Cloudflare Error 524: A Timeout Occurred (Cloudflare)524304 — HTTP 304 Not Modified (HTTP)304407 — HTTP 407 Proxy Authentication Required (HTTP)407LIMIT_FILE_SIZE — Upload error: File too large (LIMIT_FILE_SIZE / file exceeds maximum upload size) (API)LIMIT_FILE_SIZEBadDigest — Upload error: checksum mismatch (BadDigest / Content-MD5 did not match / XAmzContentSHA256Mismatch) (API)BadDigest1003 — Cloudflare Error 1003: Direct IP access not allowed (Cloudflare)10031004 — Cloudflare Error 1004: Host Not Configured to Serve Web Traffic (Cloudflare)1004409 — HTTP 409 Conflict (HTTP)409InterruptedException — java.lang.InterruptedException (sleep interrupted) (Java)InterruptedExceptionTimeoutException — java.util.concurrent.TimeoutException (Java)TimeoutException

Directly related (12)

CORSAPI

CORS Error: No 'Access-Control-Allow-Origin' header is present

The browser blocked a cross-origin request because the server’s response didn’t include the CORS headers allowing your site’s ori…

session_start()PHP

Warning: session_start(): Session cannot be started after headers have already been sent

session_start() ran after output was sent, so PHP can’t set the session cookie.

411HTTP

HTTP 411 Length Required

The server refuses a request with a body but no Content-Length header.

BOM outputPHP

Unexpected characters at the top of the page / headers already sent by BOM

A UTF-8 byte-order mark (BOM) at the start of a PHP file is sent as output, breaking headers, JSON and images.

100HTTP

HTTP 100 Continue

An interim response telling the client to go ahead and send the request body — normal when the client sent Expect: 100-continue.

1035Cloudflare

Cloudflare Error 1035 / 1036: Invalid request rewrite (invalid URI path / query string)

A Transform Rule (URL rewrite) produced an invalid path or query string.

Headers already sentPHP

Warning: Cannot modify header information - headers already sent

You called `header()`, `setcookie()` or `session_start()` after output had already been sent to the browser.

CSP violationJavaScript

Refused to load the script because it violates the following Content Security Policy directive

The page’s Content-Security-Policy doesn’t allow that script, style, image or connection source.

103HTTP

HTTP 103 Early Hints

An interim response that sends Link headers early so the browser can preload CSS, fonts or scripts while the server is still buil…

417HTTP

HTTP 417 Expectation Failed

The server or a proxy can’t meet the Expect header in the request — almost always Expect: 100-continue.

1037Cloudflare

Cloudflare Error 1037: Invalid rewrite rule (failed to evaluate expression)

A rewrite rule’s dynamic expression failed at runtime — for example a function received a value of the wrong type or a missing fi…

428HTTP

HTTP 428 Precondition Required

The server requires a conditional request (If-Match / If-Unmodified-Since) to prevent lost updates, and you didn’t send one.

Two steps away (34)

AccessDeniedAWS

AWS S3: AccessDenied (403) when calling GetObject / PutObject

An IAM policy, bucket policy, ACL/ownership setting, Block Public Access or KMS key policy denied the S3 request.

401HTTP

HTTP 401 Unauthorized

The request has no valid authentication credentials — you need to log in or send a valid token.

403HTTP

HTTP 403 Forbidden

The server understood the request but refuses to authorize it — you (or the server process) are not allowed to access this resour…

ExpiredTokenAWS

AWS: ExpiredToken — The security token included in the request is expired

Temporary AWS credentials (STS/SSO/assumed role) have expired.

session save pathPHP

Warning: session_start(): open(/var/lib/php/sessions/sess_x, O_RDWR) failed: Permission denied

PHP can’t write session files to the configured session.save_path.

416HTTP

HTTP 416 Range Not Satisfiable

The client asked for a byte range (Range: bytes=…) that lies outside the file — usually a resumed download of a file that changed…

400HTTP

HTTP 400 Bad Request

The server could not understand the request because its syntax, headers or body are malformed or invalid.

413HTTP

HTTP 413 Content Too Large (Request Entity Too Large)

The request body is bigger than the server is willing to accept — usually a file upload over the configured limit.

parameter_missingAPI

API Error: Missing required parameter (parameter_missing / "x" is required)

The API rejected the request because a field it requires — in the query string, path, headers or JSON body — wasn’t sent or was e…

URIErrorJavaScript

URIError: URI malformed

decodeURIComponent/decodeURI received an invalid percent-encoded sequence.

UnicodeEncodeErrorPython

UnicodeEncodeError: 'charmap' codec can't encode character '\u2192'

Python tried to write text in an encoding that can’t represent some characters — common in Windows consoles and files opened with…

505HTTP

HTTP 505 HTTP Version Not Supported

The server doesn’t support the HTTP protocol version used in the request.

Link expiredWordPress

WordPress: The link you followed has expired

Usually an upload (theme, plugin, media) larger than PHP’s upload/post limits — WordPress receives an empty request and shows thi…

file_type_not_allowedAPI

Upload error: File type not allowed / unsupported file type

The upload was rejected because the file’s type — extension, MIME type or actual content — isn’t on the allowed list.

1000Cloudflare

Cloudflare Error 1000: DNS points to prohibited IP

A proxied DNS record points at a Cloudflare IP address, creating a loop.

1001Cloudflare

Cloudflare Error 1001: DNS resolution error

Cloudflare received the request but the hostname isn’t set up on Cloudflare (or the domain was just added and not active yet).

1002Cloudflare

Cloudflare Error 1002: DNS points to Prohibited IP / Restricted

A record points to a private, reserved or Cloudflare IP that Cloudflare won’t proxy to.

500HTTP

HTTP 500 Internal Server Error

The server hit an unexpected condition — usually an unhandled exception or misconfiguration in the application.

Call to undefined functionPHP

PHP Fatal error: Uncaught Error: Call to undefined function

PHP can’t find the function you called — usually a missing extension, missing include, or namespace issue.

Undefined array keyPHP

Warning: Undefined array key / Undefined index

Your code reads an array key that doesn’t exist — common with `$_GET`, `$_POST` and decoded JSON.

Mixed ContentAPI

Mixed Content: The page was loaded over HTTPS, but requested an insecure resource

An HTTPS page tried to load a script, API or image over plain HTTP, and the browser blocked (or warned about) it.

blocked a frameJavaScript

SecurityError: Blocked a frame with origin "x" from accessing a cross-origin frame.

Script tried to read or modify an iframe (or window) from another origin.

Script error.JavaScript

Script error. (at line 0) — cross-origin error details hidden

An error happened in a script from another origin, and the browser hid the details.

504HTTP

HTTP 504 Gateway Timeout

A proxy or gateway waited too long for the upstream server to respond and gave up.

524Cloudflare

Cloudflare Error 524: A Timeout Occurred

Cloudflare connected to the origin, but the origin didn’t send an HTTP response within 100 seconds.

304HTTP

HTTP 304 Not Modified

The cached copy is still valid, so the server sends no body and the client reuses its cache.

407HTTP

HTTP 407 Proxy Authentication Required

A proxy between you and the server requires credentials before it will forward your request.

LIMIT_FILE_SIZEAPI

Upload error: File too large (LIMIT_FILE_SIZE / file exceeds maximum upload size)

The uploaded file is larger than the limit set by the API, framework or server.

BadDigestAPI

Upload error: checksum mismatch (BadDigest / Content-MD5 did not match / XAmzContentSHA256Mismatch)

The server computed a different checksum for the data it received than the one your client declared, so it rejected the upload as…

1003Cloudflare

Cloudflare Error 1003: Direct IP access not allowed

The request went to a Cloudflare IP address directly (or with a Host header for a domain not on Cloudflare).

1004Cloudflare

Cloudflare Error 1004: Host Not Configured to Serve Web Traffic

The DNS record was just created or changed and Cloudflare hasn’t propagated it yet — or Spectrum/non-HTTP ports are involved.

409HTTP

HTTP 409 Conflict

The request conflicts with the current state of the resource — e.g. a duplicate or an edit based on an outdated version.

InterruptedExceptionJava

java.lang.InterruptedException (sleep interrupted)

A blocked thread (sleep, wait, join, queue take) was interrupted by another thread.

TimeoutExceptionJava

java.util.concurrent.TimeoutException

A Future.get(timeout) or async operation didn’t complete in the allowed time.