Multi-Site Setup

PageBridge supports syncing multiple Google Search Console properties into a single Sanity project.

How it works

Each GSC property is represented by a separate gscSite document in Sanity. All data (snapshots, tasks, analytics) is scoped to the site ID, so multiple properties can coexist without conflicts.

Setting up multiple sites

  1. Create a gscSite document in Sanity for each property
  2. Configure each site with its own siteUrl and urlConfigs array (per-content-type URL structures)
  3. Run separate sync commands for each site

Example configuration

Suppose you have a main site and a blog subdomain:

Site A: Main site

{
  "siteUrl": "sc-domain:example.com",
  "urlConfigs": [
    { "contentType": "page", "slugField": "slug" },
    { "contentType": "landingPage", "slugField": "slug" }
  ]
}
json

Site B: Blog

{
  "siteUrl": "sc-domain:blog.example.com",
  "urlConfigs": [
    { "contentType": "post", "slugField": "slug", "pathPrefix": "/blog" },
    { "contentType": "article", "slugField": "slug", "pathPrefix": "/articles" }
  ]
}
json

Syncing multiple sites

# Sync each site separately
pagebridge sync --site sc-domain:example.com
pagebridge sync --site sc-domain:blog.example.com
bash

Service account access

The Google service account must be added to each GSC property individually. Go to each property's settings in Google Search Console and add the service account email with Full permissions.

Verify access for all sites with:

pagebridge list-sites
bash

Filtering in Studio

The Refresh Queue and snapshot views in Sanity Studio show data from all sites by default. Each snapshot and task references a specific gscSite document, so you can filter by site if needed.

See also