---
title: req.host
description: Returns the hostname from the "Host" header field (void of portno).
---

<h3 id='req.host'>req.host</h3>

Returns the hostname from the "Host" header field (void of portno).

```js
// Host: "example.com:3000"
console.dir(req.host);
// => 'example.com'
```
