Search.../

url

Gets the full URL of the current page.

Description

Premium sites: Premium site URL

Free sites: Free site URL

If the site is not yet published, the function returns null.

Type:

stringRead Only

Related Content:

Was this helpful?

Get the full URL of the current page

Code Example

Copy Code
1import wixLocation from 'wix-location';
2
3// ...
4
5let url = wixLocation.url;
6// Premium site: "https://domain.com/animals/mammals/elephant?species=african-elephant#desc"
7// Free site: "https://user.wix-sites.com/zoo/animals/mammals/elephant?species=african-elephant#desc"