Requests through CNAME return 404, while origin server returns 200

Sending a request to the origin server directly results in a 200.

Sending the same request to a Cloudflare CNAME results in 404.

Note: The CNAME is not proxied. (DNS only)

The following headers were removed:

  • Cache-Control
  • Content-Encoding
  • ETag
  • Last-Modified
  • Server
  • Strict-Transport-Security
  • Surrogate-Key
  • X-Content-Type-Options

…and the following headers were replaced:

  • Content-Length
  • Content-Type
  • Date

…and the following headers were preserved:

  • Accept-Ranges
  • Connection
  • X-HW

Any idea why the origin server works, but the CNAME does not?

Troubleshooting I’ve tried:

  • Remove and re-add the CNAME
  • Toggling “DNS only” off and on
  • Purging everything in the cache
  • Custom purge

Then it’s really not a Cloudflare CNAME. Those requests would go directly to the server the CNAME points to and you’ll have to resolve the issue at that server in its response to a CNAME’d request.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.