HTML DOM Document URL

Example

Return the full URL of the document:

document.URL;
Try it Yourself »

Description

The URL property returns the full URL of the document.


Syntax

document.URL

Return Value

Type Description
StringThe entire URL of the document, including the protocol (like http://)

Browser Support

document.URL is a DOM Level 1 (1998) feature.

It is fully supported in all browsers:

Chrome Edge Firefox Safari Opera IE
Yes Yes Yes Yes Yes 9-11

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.