Webflow sync, pageviews & more.
NEW

How can we obtain the staging domain's URL when using the Webflow API command 'Publish site' and the 'List domains' command only returns custom domain names?

TL;DR
  • Use the Get Site endpoint to retrieve the site's shortName.
  • Form the staging domain manually as [shortName].webflow.io, since it's not returned by the API.

When using the Webflow API, the staging domain (i.e., the default Webflow.io domain) does not appear in the response from the List Site Domains endpoint—it only returns custom domains you've connected. Here's how to work around that.

1. Understand the Default Staging Domain Format

  • Every Webflow site automatically has a default staging domain in this format:
    [site-name].webflow.io
  • This URL is not stored or returned by the Webflow API, but can be inferred.

2. Get the Site Name via the API

  • Use the Get Site endpoint:
    GET https://api.webflow.com/sites/<site_id>
  • In the response, look for the shortName or name field.
  • The shortName typically corresponds to the staging domain subdomain.
  • For example, if shortName = my-awesome-site, then the staging domain is:
    my-awesome-site.webflow.io

3. Validate the Staging Domain (Optional)

  • You can test the staging URL manually or with automated checks to confirm it:
  • Open in a browser: https://[shortName].webflow.io
  • Ensure the site is actually published to Webflow.io via the Web App or API

Summary

The staging domain URL ([shortName].webflow.io) is not returned by the Webflow API, including the List Domains call. Instead, retrieve the site’s shortName from the Get Site endpoint, and manually form the staging domain using Webflow's standard format.

Rate this answer

Other Webflow Questions