Skip to content
RU

Cloudflare Error 1003: Direct IP Access Not Allowed. Use the Hostname

What it means: Something requested a Cloudflare IP address directly, without a hostname Cloudflare can match to a website.

  1. Open the site by its domain name
  2. Remove hard-coded Cloudflare IPs from clients
  3. Pin an IP with curl --resolve instead
  4. Reach the origin by its own IP

Test your URL now

Requests the address and shows the status code and what the server sends back.

What error 1003 means

Cloudflare's text is short: "This error indicates that direct access to a Cloudflare IP address is not allowed", caused when "a client or browser directly accesses a Cloudflare IP address" (Cloudflare: Error 1003). The page title reads "Direct IP access not allowed", and the HTTP status is 403; the 1003 code is in the page body (Cloudflare 1xxx errors).

The reason is how Cloudflare works. Millions of websites share the same anycast addresses, and Cloudflare decides which site you want from the host name: the Host header for HTTP and the SNI field for HTTPS. A request to http://104.16.x.x/ carries an IP where the host name should be, so Cloudflare has no site to serve and answers 1003 instead. Nothing is broken on the website; the request is addressed wrongly.

Where direct-IP requests come from

SourceHow to recognise itFix
Someone typed or bookmarked an IPThe address bar shows an IP, often copied from a ping or dig outputUse the domain name
Hard-coded IP in an app, script or IoT deviceConfig files or firmware with an IP instead of a hostname; breaks for everyone at onceConfigure the hostname; let DNS resolve it
Uptime monitor or health check pointed at the IPYour own monitoring reports 403 while the site is upMonitor the URL with the hostname
HTTP client that does not send the right Host or SNIRequests built as https://IP/ plus a manual Host header; the TLS layer still sends no SNIConnect by hostname and pin the IP at the resolver level
Testing the origin by the wrong IPYou meant to reach your server, but used the address that the proxied hostname resolves to, which is Cloudflare'sUse the origin's own IP from your hosting panel

A reverse lookup of the IP or a WHOIS on it shows Cloudflare as the owner, which confirms you are talking to the edge rather than to a site's server.

How to fix it

  1. Use the hostname. https://www.example.com/, never https://104.16.x.x/. For a visitor this is the whole fix.
  2. To force a specific edge IP (for debugging, or to test a data center), keep the hostname and override resolution, so the request carries both the right SNI and the right Host:
    curl -sv --resolve www.example.com:443:104.16.0.1 https://www.example.com/ -o /dev/null
    A manual -H 'Host: www.example.com' on an IP URL fixes HTTP but not HTTPS, because the TLS layer then sends no SNI.
  3. In application code, replace IP literals with hostnames. If you need fixed addresses for allow-listing, allow Cloudflare's published ranges instead of single IPs.
  4. To reach your origin without Cloudflare, use the origin server's own IP (from the hosting panel, not from dig, which returns Cloudflare for proxied records) with --resolve, or a separate DNS-only hostname.
  5. On a local machine, a hosts-file line such as 104.16.0.1 www.example.com works because the browser still uses the hostname; an IP in the address bar does not.

If you run monitoring or an API client

Automated clients are the most common source of 1003 after a site moves behind Cloudflare. Before the move, a monitor or partner integration pointed at the server's IP worked; after it, the old IP may still be the origin, while anything that was re-pointed at the new DNS answer now targets Cloudflare's addresses. Check three places. Uptime monitors and load-balancer health checks: they must request the full URL with the hostname, otherwise every check reports 403 while real visitors are fine. API clients and webhooks configured with an IP literal: replace it with the hostname, and if the partner needs fixed addresses for their own firewall, give them Cloudflare's published ranges. Embedded devices with an IP in firmware: these fail all at once and are slow to update, so keep a DNS name in the configuration from the start. In every case the request must carry the hostname both in the TLS handshake and in the HTTP Host header.

How to confirm the fix

curl -s -o /dev/null -w '%{http_code}\n' http://104.16.0.1/
# 403
curl -s -o /dev/null -w '%{http_code}\n' https://www.example.com/
# 200

The first request shows what any bare-IP request gets; the second, with the hostname, must return the site. For monitors and integrations, check their logs for 403s after the change. The HTTP status checker requests a URL by name and shows the status code and headers it receives.

Related errors

60+ Status CodesComplete HTTP status code reference
Search by CodeQuick search for 200, 301, 404, 500
Categories 1xx–5xxInformational, success, redirects, errors
Examples & CausesWhen it occurs and how to fix it

Why teams trust us

60+
status codes
1xx-5xx
all categories
SEO
ranking impact
Free
online reference

How to use the reference

1

Enter code or keyword

2

Find description and causes

3

Apply recommendations

HTTP Status Codes Reference

HTTP status codes are three-digit numbers that the server returns for every request. They tell the browser and search crawlers what happened: success, redirect, or error.

Quick Search

Enter a code or keyword — instant result with description.

All Categories

1xx Informational, 2xx Success, 3xx Redirect, 4xx Client Error, 5xx Server Error.

Causes & Fixes

For each code: typical causes and concrete steps to resolve.

SEO Impact

How each code affects indexing and link juice transfer in Google.

Who uses this

Developers

choosing correct status

SEO

redirect optimization

DevOps

5xx error diagnostics

Marketers

landing page check

Common Mistakes

Confusing 301 and 302301 is permanent (passes SEO equity), 302 is temporary (does not).
Returning 200 on error"Soft 404s" — a 404 page with status 200 — confuse search engines and stay indexed.
Ignoring 5xx errors500, 503 are server failures. Prolonged episodes remove pages from the index.
Redirect chainsA→B→C instead of A→C slows loading and dilutes SEO equity. Simplify chains.

Best Practices

Use 301 for permanent redirectsThis passes 90–99% of link equity to the new URL.
Return 404 for missing pagesDon't mask 404 as 200 — it hurts SEO and UX.
Monitor 5xx in real timeSet up an HTTP monitor that alerts on 5xx.
Use 410 instead of 404410 Gone means "page permanently removed" — Google de-indexes faster.

Monitor HTTP statuses automatically

HTTP monitor alerts when response code changes or 5xx appears.

Sign up free

Learn more

Sources

Frequently Asked Questions

Why can't I open a Cloudflare IP address in the browser?

Many sites share each Cloudflare address, and Cloudflare picks the site from the host name in the request. A bare IP names no site, so Cloudflare returns error 1003.

What HTTP status does error 1003 use?

403 Forbidden. The 1003 code appears in the body of Cloudflare's error page.

How do I test a specific Cloudflare IP for my site?

Keep the hostname in the URL and override DNS, for example with curl --resolve www.example.com:443:IP. The request then carries the correct SNI and Host.

How do I reach my origin server directly?

Use the origin's own IP address from your hosting provider, not the address your proxied hostname resolves to, which belongs to Cloudflare.

Is error 1003 a sign that my site is blocked?

No. It only means the request was sent to a Cloudflare IP instead of your domain name. Requests that use the domain name are not affected.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.