[Chapter 21] Reference: URL.hostname
Author: David Flanagan
Date: Fri Aug 29 11:20:50 1997

#

| Chapter 21 JavaScript Reference |

# URL.hostname Property

## Name

URL.hostname Property---the hostname portion of a URL

## Availability

Navigator 2.0, Internet Explorer 3.0

## Synopsis

    URL.hostname

## Description

`hostname` is a read/write string property of the URL object. It specifies the hostname portion of a URL. For example, the `hostname` of the following (fictitious) location is "www.ora.com".

    http://www.ora.com:1234/catalog/search.html?JavaScript#result

## See Also

"Area", "Document.links[]", "Link", "URL", "Window.location"

URL.host |  | URL.href