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).

Seen on: Cloudflare

Meaning

Cloudflare needs the hostname to know which site you want. Typing a Cloudflare IP in the browser, or tools setting a wrong Host header, trigger 1003.

Common causes

  • Browsing to a Cloudflare IP instead of the domain
  • Wrong Host header in a client/proxy
  • Hosts file mapping a domain to a Cloudflare IP

⚡ Quick fix

  1. Use the domain name, not the IP
  2. Fix the Host header in your client/proxy
  3. To test the origin, connect to the origin IP, not Cloudflare’s

Detailed fix by platform

Shell

  1. bash
    curl -s https://example.com/ -o /dev/null -w '%{http_code}
    '

How to diagnose

  1. URL — IP or hostname?
  2. Host header — Matches a Cloudflare zone?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.