---
title: searchForRegistrationDomains()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/netservicebrowser/searchforregistrationdomains()
---

# searchForRegistrationDomains()

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

## Declaration

```swift
func searchForRegistrationDomains()
```

## Discussion

Discussion This method returns immediately, sending a netServiceBrowserWillSearch(_:) message to the delegate if the network was ready to initiate the search. The delegate receives a subsequent 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

### Related Documentation

- [netServiceBrowserWillSearch(_:)](foundation/netservicebrowserdelegate/netservicebrowserwillsearch(_:).md)
- [netServiceBrowser(_:didFindDomain:moreComing:)](foundation/netservicebrowserdelegate/netservicebrowser(_:didfinddomain:morecoming:).md)

### Using Network Service Browsers

- [searchForBrowsableDomains()](foundation/netservicebrowser/searchforbrowsabledomains().md)
- [searchForServices(ofType:inDomain:)](foundation/netservicebrowser/searchforservices(oftype:indomain:).md)
- [stop()](foundation/netservicebrowser/stop().md)
