About Published Site URLs

The Published Site URLs API allows you to retrieve links to the published site.
On occasion, your app might want to direct a site contributor or site visitor to the published site - for example, to the site's homepage in Spanish.

Use cases

Terminology

  • Published site: A Wix site that is live and visible to site visitors.
  • Premium: Wix site builders can pay for Premium plans to unlock additional site tools and features, including connecting their own domains. Read more about Premium plans.
  • Primary URL: Site builders can connect an unlimited number of domains (URLs) to a single Wix site. The primary URL is the domain that they connect directly to the site and is the site's main URL.
  • Secondary URL: When site builders connect additional domains/URLs to a site, they are considered secondary URLs, and will redirect visitors to the primary URL.
  • Wix Multilingual: A Wix product that manages site translation. Read more about Wix Multilingual.
Was this helpful?
Yes
No

Sample flows

This article shares some possible use cases your app could support, as well as an example flow that could support each use case. You're certainly not limited to these use cases, but they can be a helpful jumping off point as you plan your app's implementation.

Direct site contributors to their published site

You might choose to direct site contributors from within your app to the published site, for example to review the site after translation. To do this:

  1. Include a call to action that redirects to the relevant URL - for example, a button.
  2. When the site contributor clicks the button, call the List Published Site URLs endpoint.
  3. Redirect the site builder to the relevant URL as provided in the response.
Was this helpful?
Yes
No

Published Site Urls Object

The Published Site URLs object provides a list of URLs for the published site.

Properties
urlsArray <Url>maxItems 1000
List of published sites. This array will be empty if the site hasn't been published.
Was this helpful?
Yes
No

GetList Published Site Urls

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a list of a site's published URLs. If a site hasn't been published, the call returns an empty array.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Site URLs
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/urls-server/v2/published-site-urls

Was this helpful?
Yes
No