Developers

Customize User Agent Filtering

Add User-Agent substrings to the Filter Suspicious Queries block list with the user_agent_items filter.

The user_agent_items filter changes which User-Agent substrings Filter Suspicious Queries blocks.

Matching is a substring search, so you can be broad or specific.

add_filter( 'user_agent_items', 'filter_user_agent_items' );

function filter_user_agent_items( $useragents ) {
  // Copy the line below to add more agents.
  $useragents[] = 'seekportbot';
  return $useragents;
}

Not sure how to add this code? See How to include custom code on your website.

Still stuck? Get help or contact us.

Larger screenshot

Enlarged image