baseUrl


baseUrlstringRead-only

Returns the base URL of the router request.

Premium sites: Premium site baseUrl

Free sites: Free site baseUrl

Note: The above URLs are for a published site. When previewing your site, you will receive the Editor URL.

Get the base URL of the router request
JavaScript
export function myRouter_Router(request) { let baseUrl = request.baseUrl; // Premium site: "https://domain.com/" // Free site: "https://user.wixsite.com/zoo/" }
Did this help?