Search...
baseUrl
Gets the base URL of the current page.
Description
Premium sites:
Free sites:
Type:
stringRead Only
Related Content:
Was this helpful?
Get the base URL of the current page
Copy Code
1import wixLocationFrontend from 'wix-location-frontend';23// Premium site URL: "https://www.domain.com/elephant?species=african-elephant"4// Free site URL: "https://user_name.wixsite.com/zoo/elephant?species=african-elephant"56let baseUrl = wixLocationFrontend.baseUrl;7// Premium site: "https://domain.com/"8// Free site: "https://user_name.wixsite.com/zoo/"