<!--
{
  "documentType" : "article",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/url-filters",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "URL filters"
}
-->

# URL filters

Create a filter that analyzes full URLs, while preserving privacy.

## Discussion

URL filters allow you to filter URL requests by analyzing the full URL against your URL data set (containing URLs you want to block) and determining whether to allow or block access to the URL.
The URL filter API is highly performant and supports filtering millions of URLs, which wouldn’t be practical by simply loading a list of disallowed URLs into memory.

Network Extension URL Filter examines all URL requests sent via WebKit and the <doc://com.apple.documentation/documentation/Foundation/URLSession> API.
You create and manage a URL filter by using the [`NEURLFilterManager`](/documentation/NetworkExtension/NEURLFilterManager) API and implementing the [`NEURLFilterControlProvider`](/documentation/NetworkExtension/NEURLFilterControlProvider) protocol in your app extension to fetch a Bloom filter onto the device.
Network Extension performs URL filtering on your behalf with your URL data set, using both the Bloom filter on the device as well as an off-device database hosted on your Private Information Retrieval (PIR) server.
The system first consults the Bloom filter to allow URLs that it can quickly determine aren’t in the filter list, then performs off-device database lookups with your PIR server if necessary.
With this appoach, Network Extension URL Filter provides a performant yet privacy-preserving solution for both consumer and managed deployments.

For an example of writing and configuring a URL filter extension, see the [Filtering traffic by URL](/documentation/NetworkExtension/filtering-traffic-by-url) sample code project.

Register your Network Extension URL Filter configuration on the [Identity & Trust](https://icloud.developer.apple.com/dashboard/identity) page in the [CloudKit Console](https://icloud.developer.apple.com/).

For browsers or any app that doesn’t use WebKit or <doc://com.apple.documentation/documentation/Foundation/URLSession>, use the [`NEURLFilter`](/documentation/NetworkExtension/NEURLFilter) Participation API to voluntarily check URLs.
Call the [`verdict(for:)`](/documentation/NetworkExtension/NEURLFilter/verdict(for:)) method to check all URL requests and honor the returned verdict by failing the URL requests for blocked URLs.

## Topics

### URL filters

[`NEURLFilterManager`](/documentation/NetworkExtension/NEURLFilterManager)

A class you use to configure and control a URL filter.

[`NEURLFilterControlProvider`](/documentation/NetworkExtension/NEURLFilterControlProvider)

A protocol that defines an object that’s responsible for fetching pre-filter data.

[`NEURLFilterControlProviderConfiguration`](/documentation/NetworkExtension/NEURLFilterControlProviderConfiguration)

A class that defines app extension configurations for the URL Filter control provider app extension.

[`NEURLFilter`](/documentation/NetworkExtension/NEURLFilter)

A class used to voluntarily validate URLs for apps that don’t use WebKit or the URL session API.

### Sample code projects

[Filtering traffic by URL](/documentation/NetworkExtension/filtering-traffic-by-url)

Perform fast and robust filtering of full URLs by managing URL filtering configurations.

[Setting up a PIR server for URL filtering](/documentation/NetworkExtension/setting-up-a-pir-server-for-url-filtering)

Configure and run a PIR server to support a URL filter using Apple’s open source container tool.

[Using the Bloom filter tool to configure a URL filter](/documentation/NetworkExtension/using-the-bloom-filter-tool)

Create the files a URL filter needs for its Bloom prefilter.

### URL filters

[`NEURLFilter`](/documentation/NetworkExtension/NEURLFilter)

A class used to voluntarily validate URLs for apps that don’t use WebKit or the URL session API.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)