About Published Site URLs

The Published Site URLs API allows you to retrieve links to a published site, including the site's primary and secondary URLs, and their language info.

On occasion, you might want to direct a Wix user to the published site - for example, to the site's homepage in a secondary language. With this API, you can easily access the URLs to their published site.

Use cases

Terminology

  • Published site: A Wix site that is live and visible to site visitors.
  • Premium: Wix users can pay for Premium plans to unlock additional site tools and features, including connecting their own domains. Read more about Premium plans.
  • Primary URL: Wix users 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 Wix users 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.
Did this help?

Sample flows

This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.

Direct Wix users to their published site

You might choose to direct Wix users from within your app to the published site. To do this:

  1. Include a call to action that redirects to the relevant URL - for example, a button.
  2. When the Wix user clicks the button, call the List Published Site URLs method.
  3. Redirect the site builder to the relevant URL as provided in the response.
Did this help?

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 site URLs. This array will be empty if the site isn't published.

Did this help?