Origin access restrictions can prevent ordinary visitors from bypassing Cloudflare and reaching the web server directly. Implement them with the hosting provider so required management, mail and monitoring access remains available.
IN THIS ARTICLE
Information to have ready
Inventory every service on the server, including shared-hosting neighbours where applicable. Keep console or another recovery route and decide whether Cloudflare Tunnel, firewall restrictions or authenticated origin connections fit the deployment.
01 Plan origin access restrictions behind Cloudflare
- Confirm the public web hostnames are correctly proxied and work under the intended TLS configuration.
- Discuss the design with the server administrator. On shared hosting, customers should not change the server firewall or assume exclusive control of its IP.
- If using IP restrictions, allow the current official Cloudflare ranges for the relevant web ports before adding the restrictive rule. Include required IPv4 and IPv6 paths.
- Consider authenticated origin protection appropriate to the service so source-IP access alone is not the entire trust decision.
- Test through Cloudflare, required administrator access and an authorised direct-origin check. Monitor for certificate-renewal or health-check failures after the change.
Confirm the expected result
Public web access should follow the intended Cloudflare path while authorised operational services still function. Maintain an update process for any externally published address ranges.
Troubleshoot unexpected results
An exposed DNS-only mail hostname can reveal the origin address even when the web record is proxied. Restricting all ports to Cloudflare addresses can break mail, SSH and FTP. Scope the network controls to the actual architecture.
Does hiding the IP alone secure the origin?
No. Historical DNS and other services may reveal it. Enforced access controls, authentication and maintained application security provide protection beyond obscuring an address.