---
title: domain
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/httpcookie/domain
---

# domain

The domain of the cookie.

## Declaration

```swift
var domain: String { get }
```

## Discussion

Discussion If the domain does not start with a dot, then the cookie is only sent to the exact host specified by the domain. If the domain does start with a dot, then the cookie is sent to other hosts in that domain as well, subject to certain restrictions. See RFC 6265 for more detail.

## See Also

### Getting cookie host properties

- [path](foundation/httpcookie/path.md)
- [portList](foundation/httpcookie/portlist.md)
