Large-scale site management with Webflow Enterprise APIs
Managing multiple Webflow sites at scale requires consistency, efficiency, and compliance. Webflow Enterprise APIs help you automate site management, streamline workflows, and ensure all your projects stay in sync.
If you’re part of an enterprise team, a large agency, or a developer managing multiple Webflow sites, this guide is for you.
When to use these APIs
- Deploying multiple sites consistently
Apply the same settings and templates across all your sites to maintain brand and operational standards. - Migrating existing websites to Webflow
Simplify the migration process by automating configurations and maintaining consistent structures during the transition. - Ensuring compliance across sites
Use the APIs to enforce privacy, SEO, and other compliance-related settings efficiently
What you’ll learn
By the end of this guide, you’ll be able to programmatically:
- Set up and manage multiple Webflow sites
- Create rules for search engines and set a custom sitemap in
robots.txt
- Setup 301 redirects
- Add
.well-known
files to your site - Track activity and ensure compliance.
Prerequisites
Environment Setup
- API Tools: Use tools like Postman to test API requests, or our API Playground on endpoint links.
- Development Environment: Ensure Node.js is installed if you plan to run scripts. The JavaScript examples provided in this tutorial also demonstrate loops and other logic for programmatic usage.
- Workspace Access: Confirm that you have permissions to create, modify, and manage sites in your Webflow Workspace.
Tutorial
In this tutorial, we’ll walk through programmatically creating and managing sites in an Enterprise Workspace using the Enterprise APIs. Throughout each workflow, we’ll take actions to ensure the sites are consistent in all aspects of branding, functionality, and compliance.
Automate site creation
In this workflow, we’ll create three sites from a Workspace template.
Get Workspace information
Start by making a request to the “Authorization Information” endpoint to get your WorkspaceId
. This ID will be used to create new sites within the desired Workspace. Save this WorkspaceId
for later use.
Get the template name
Navigate to your Workspace settings under the ‘Templates & Libraries’ section to find the templateName
you want to use. This will allow you to create sites based on an existing template, ensuring consistency across your sites.
Prepare site names
Create an array of the site names you want to use. These names should be unique and descriptive.
Create sites programmatically
Set up a loop to iterate through your array of site names and send a request to the “Create Site” endpoint for each. Save the siteId
for each created site for use in future workflows.
Adding sites to folders
Optionally, you can pass a parentFolderId
parameter, which allows you to create a site within a Workspace folder. To get this ID, navigate to the Workspace folder in your Dashboard and get the ID that appears after “folder/” in the URL.
Configure `robots.txt`
As a Workspace Administrator, you can configure each site’s robots.txt
file through the “Replace robots.txt
” endpoint. This ensures search engines can access the right pages with consistent rules for userAgents
, specifying which pages should be crawled and which should not.
Prepare rules for each user agent
To ensure consistent SEO behavior across all sites, you should define specific rules for different search engine user agents in the robots.txt
file. Below are some example rules:
User-Agent | Rule Type | Rules | Reason |
---|---|---|---|
Googlebot | Disallow | /private | Prevent Google from indexing pages containing sensitive customer data or internal admin pages. |
Allow | / | Ensure that all other pages are indexed to maximize site visibility. | |
Bingbot | Disallow | /testing | Block Bing from indexing pages under development or testing to prevent unfinished content. |
Allow | / | Allow the rest of the website to be indexed for improved reach and visibility on Bing. | |
All (* ) | Disallow | /scripts | Prevent any search engine from indexing JavaScript files that do not provide useful content. |
Disallow | /temp | Temporary files and pages should not be indexed to avoid clutter in search results. | |
Allow | / | Allow general content pages to be indexed to enhance user discovery through various search engines. |
These rules help control which parts of your site are accessible to search engines, ensuring the correct balance between visibility and privacy.
Apply rules to each site
Now, send a request to the “Replace robots.txt
” endpoint to apply these robots.txt
rules to each of the newly created sites using the siteIds
that were stored earlier. This will ensure that all sites follow the same SEO standards and protect sensitive content effectively.
Set up URL redirects
Setting up URL redirects is crucial during site migrations or when restructuring a website to maintain SEO and provide a seamless experience for users. Redirects ensure that users and search engines can still access your content even if URLs have changed.
Create URL redirects for each site
Send a POST request to the “Create URL Redirect” endpoint to create a single redirect rule. Below is a JavaScript example of how to create redirects programmatically for each site:
Important considerations for redirects
- Testing: Always test the redirects after setting them up to ensure they work as intended.
- Avoid Redirect Chains: Redirect chains (redirects that point to other redirects) can harm SEO and reduce page load speed.
- Review Regularly: Set up a plan for regularly reviewing redirects to remove outdated rules and avoid bloating.
Upload well-known files
If your site has a paired Apple app experience, you can ensure seamless integration between your site and your app by uploading well-known files like Apple associated domain files.
Identify the well-known file to upload
Determine which well-known file needs to be uploaded. For a site with a paired Apple app, you’ll need to upload an Apple associated domain file (apple-app-site-association
). This file helps ensure the app works correctly with your site, such as enabling Universal Links.
Upload the well-known file
Use the “Set a Well-Known File” endpoint to upload the well-known file to each site.
Monitor site activity
As a Site or Workspace administrator, it’s essential to maintain visibility and control over changes within your environment.
Webflow’s Site Activity log provides comprehensive tracking of important site changes, helping you ensure compliance and monitor for any potential issues. With the Enterprise APIs, you can export these logs to an external monitoring service, allowing you to integrate activity tracking into your broader compliance and auditing processes.
Send an API request for Site Activity Logs
Use the “Get Site Activity logs” endpoint to get information on changes made to a site. You could set this up as a scheduled task to run at a regular interval to continuously monitor the activity on your Webflow sites.
Integrate logs with your logging software
Once you retrieve the logs, you could forward them to your existing logging software (such as Datadog, Splunk, or ELK Stack) using an API or webhook. This ensures that Webflow activity is captured alongside other application and infrastructure logs.
Set up compliance alerts
Within your logging platform, configure compliance alerts to flag specific activities of interest. Refer to the Site Activity log response schema for a complete list of available resourceOperation
and event
values you can monitor. Here are some recommended activities to track:
Created operations
Modified operations
Published operations
Unpublished operations
Deleted operations
Conclusion
You’ve now gained the skills and knowledge to programmatically set up multiple Webflow sites, apply consistent settings, and monitor site activity to ensure compliance and scalability.
To take the next steps, start experimenting with these APIs in your enterprise projects. Visit our API Reference Documentation to explore additional endpoints and functionality that can help further streamline your workflows.
Additional Resources:
- Webflow API Reference
- Webflow Enterprise to find out more about Enterprise features.
- Webflow Help Center for more guidance and support.
If you encounter challenges or have questions, feel free to reach out to our support team or join the Webflow Developer Community to connect with others working on similar projects.