Skip to content

How do I configure a CAPTCHA rule for a specific hostname in AWS WAF?

2 minute read
0

I want to create a CAPTCHA rule for a specific hostname for my protection pack in AWS WAF.

Resolution

To create a CAPTCHA rule that checks a specific hostname, complete the following steps:

  1. Open the AWS WAF console.
  2. In the navigation pane, choose AWS WAF.
  3. Choose Resources & protection packs.
  4. Find the associated protection pack and choose View and edit next to Rules. This will open a right pane.
  5. In the right pane, choose Add rule.
  6. Choose Custom rule and select Next.
  7. Choose Custom rule again and select Next.
  8. To set up your rule, configure the following values:
    For Action, choose CAPTCHA.
    For Rule name, enter a rule name.
    For If a Request, choose Matches the statement.
    For Inspect, choose Single header.
    For Header field name, enter Host.
    For Match type, choose Exactly matches String.
    For String to match, enter your hostname.
  9. Choose Create rule.
    Note: If you have multiple rules and you need to change the rule priority, then select Edit rule order in the right pane. Move the recently created rule to the desired priority.
  10. Choose Save rule order.

Related information

CAPTCHA and Challenge in AWS WAF

How can I use AWS WAF to help prevent brute force login attacks?

AWS OFFICIALUpdated 3 months ago