---
title: "CFURLCopyNetLocation(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfurlcopynetlocation(_:)"
---

# CFURLCopyNetLocation(_:)

Returns the net location portion of a given URL.

## Declaration

```swift
func CFURLCopyNetLocation(_ anURL: CFURL!) -> CFString!
```

## Parameters

- `anURL`: The CFURL object to examine.

## Return Value

Return Value The net location of anURL, or NULL if the URL cannot be decomposed (doesn’t conform to RFC 1808). Ownership follows the create rule. See The Create Rule.

## Discussion

Discussion The URL net location is the portion of the URL that identifies the network address of the resource. It includes the optional username and password, as well as the target machine’s IP address or host name. This function leaves any percent escape sequences intact.

## See Also

### Accessing the Parts of a URL

- [CFURLCanBeDecomposed(_:)](corefoundation/cfurlcanbedecomposed(_:).md)
- [CFURLCopyFileSystemPath(_:_:)](corefoundation/cfurlcopyfilesystempath(_:_:).md)
- [CFURLCopyFragment(_:_:)](corefoundation/cfurlcopyfragment(_:_:).md)
- [CFURLCopyHostName(_:)](corefoundation/cfurlcopyhostname(_:).md)
- [CFURLCopyLastPathComponent(_:)](corefoundation/cfurlcopylastpathcomponent(_:).md)
- [CFURLCopyParameterString(_:_:)](corefoundation/cfurlcopyparameterstring(_:_:).md)
- [CFURLCopyPassword(_:)](corefoundation/cfurlcopypassword(_:).md)
- [CFURLCopyPath(_:)](corefoundation/cfurlcopypath(_:).md)
- [CFURLCopyPathExtension(_:)](corefoundation/cfurlcopypathextension(_:).md)
- [CFURLCopyQueryString(_:_:)](corefoundation/cfurlcopyquerystring(_:_:).md)
- [CFURLCopyResourceSpecifier(_:)](corefoundation/cfurlcopyresourcespecifier(_:).md)
- [CFURLCopyScheme(_:)](corefoundation/cfurlcopyscheme(_:).md)
- [CFURLCopyStrictPath(_:_:)](corefoundation/cfurlcopystrictpath(_:_:).md)
- [CFURLCopyUserName(_:)](corefoundation/cfurlcopyusername(_:).md)
- [CFURLGetPortNumber(_:)](corefoundation/cfurlgetportnumber(_:).md)
