Require known IP addresses in site admin area
Last updated Apr 16, 2026 If an attack compromises the administrative area of your website, the consequences can be severe. With custom rules, you can protect your site's admin area by blocking requests for access to admin paths that do not come from a known IP address.
This example custom rule limits access to the WordPress admin area, /wp-admin/, by blocking requests that do not originate from a specified set of IP addresses:
- When incoming requests match:
| Field | Operator | Value | Logic |
|---|---|---|---|
| IP Source Address | is not in | 10.20.30.40 192.168.1.0/24 |
And |
| URI Path | wildcard | /wp-admin/* |
If you are using the expression editor:
(not ip.src in {10.20.30.40 192.168.1.0/24} and http.request.uri.path wildcard "/wp-admin/*")
- Then take action: Block
Other resources
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/waf/custom-rules/use-cases/site-admin-only-known-ips/#page","headline":"Require known IP addresses in site admin area","description":"Restrict admin area access to known IP addresses.","url":"https://developers.cloudflare.com/waf/custom-rules/use-cases/site-admin-only-known-ips/","inLanguage":"en","image":"https://developers.cloudflare.com/waf/custom-rules/use-cases/site-admin-only-known-ips/og.png?v=17e66c82ee5519a6","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Block R-U-Dead-Yet slow POST attacks with custom rules. title: Stop R-U-Dead-Yet? (R.U.D.Y.) attacks image: https://developers.cloudflare.com/waf/custom-rules/use-cases/stop-rudy-attacks/og.png?v=86a5524fe87c675f
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/waf/llms.txt
Use this file to discover all available pages before exploring further.
Docs