<!--
{
  "availability" : [
    "iOS: 2.0.0 - 27.2.0",
    "iPadOS: 2.0.0 - 27.2.0",
    "macCatalyst: 13.1.0 - 27.2.0",
    "macOS: 10.2.0 - 27.2.0",
    "tvOS: 9.0.0 - 27.2.0",
    "visionOS: 1.0.0 - 27.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NetServiceBrowser/searchForRegistrationDomains()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSNetServiceBrowser(im)searchForRegistrationDomains"
  },
  "title" : "searchForRegistrationDomains()"
}
-->

# searchForRegistrationDomains()

Initiates a search for domains in which the host may register services.

```
func searchForRegistrationDomains()
```

## Discussion

This method returns immediately, sending a [`netServiceBrowserWillSearch(_:)`](/documentation/Foundation/NetServiceBrowserDelegate/netServiceBrowserWillSearch(_:)) message to the delegate if the network was ready to initiate the search. The delegate receives a subsequent [`netServiceBrowser(_:didFindDomain:moreComing:)`](/documentation/Foundation/NetServiceBrowserDelegate/netServiceBrowser(_:didFindDomain:moreComing:)) message for each domain discovered.

Most network service browser clients do not have to use this method—it is sufficient to publish a service with the empty string, which registers it in any available registration domains automatically.

## See Also

[`func netServiceBrowserWillSearch(NetServiceBrowser)`](/documentation/Foundation/NetServiceBrowserDelegate/netServiceBrowserWillSearch(_:))

Tells the delegate that a search is commencing.

[`func netServiceBrowser(NetServiceBrowser, didFindDomain: String, moreComing: Bool)`](/documentation/Foundation/NetServiceBrowserDelegate/netServiceBrowser(_:didFindDomain:moreComing:))

Tells the delegate the sender found a domain.



---

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)