Protect Origin IP address using urlrewrite

Will this urlrewrite rule (IIS) adequately protect my Origin IP? I’m trying to disallow connections using an IP address or another Cloudflare website pointed to my IP address. My proposed rule:

<rule name="Allow only myname.com" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^myname\.com$" negate="true" /> </conditions> <action type="CustomResponse" statusCode="403" /> </rule>