Domains And Webhooks
Domains and webhooks connect console configuration to the public sites app. Domains send customers to the right tenant. Webhooks and revalidation keep public content fresh after operator changes.
Domain Model
Sites are tenant-scoped. In production, a customer may reach the site through:
- A custom domain.
- A Sophosic shop subdomain.
- A platform fallback domain.
In local development, use path routing:
http://localhost:3008/{site-slug}
http://localhost:3008/{site-slug}/shop
http://localhost:3008/{site-slug}/bookingsKeep those routing models separate when debugging. A production custom domain proves DNS and certificate behavior, while local path routing proves tenant resolution and page behavior. Mixing the two can make a healthy local route look like a broken production-domain problem.
DNS Setup
Use Settings > Domain and Email to:
- Add domain.
- Detect provider guidance.
- Review required DNS records.
- Export BIND or CSV records for a DNS administrator.
- Verify domain status.
- Configure branded email records.
Mail records should not be proxied through providers that break email delivery.
Console Setup Preview
The Domain and Email area should show enough state for an operator to know whether the public URL is ready for customers.
Domain list
Expected state: Final domain attached to the intended workspace
Public proof: Browser resolves the final customer URL to the right site
DNS records
Expected state: Required records visible, copied exactly, and verified when provider propagation completes
Public proof: DNS lookup matches the console guidance
Sender identity
Expected state: Reply-to, sender domain, and email authentication records are configured
Public proof: Customer notification uses the intended sender
Technical routes
Expected state: Sitemap, robots, social preview, and AI/search summary routes reflect the final site
Public proof: Crawler routes load from the final host
Webhook delivery
Expected state: Recent event category and authorization state are visible in logs or diagnostics
Public proof: Console changes refresh the matching public route
If the final domain is not ready, keep launch traffic on a verified fallback host or keep the workspace protected until DNS and sender state are verified.
Public Technical Routes
The sites app exposes tenant-specific technical routes such as:
/robots.txtSearch crawler rules
/sitemap.xmlPublic page discovery
/llms.txtAI/search-friendly site summary
/og-imageShare preview image
/indexnowSearch engine update signal
/.well-known/...Provider verification such as payment method domains
Use Discovery and domain settings when these routes do not reflect the expected workspace.
Webhook Invalidation
The public site may use webhooks to refresh cached content when console data changes.
Common webhook categories:
- Branding.
- Domains.
- Products.
- Bookings.
- Pages.
- Forms.
- Help.
- Knowledge content.
- Media.
- Settings.
- Stripe.
- Shipping.
When public content appears stale, check whether the relevant category has a webhook route, whether the request was authorized, and whether the public page uses the expected cache tag.
Webhook Route Preview
Use this map when connecting a console save to the public route that should change.
BrandingLogo, theme, font, migration banner
Expected public refresh: Header, footer, favicon, social preview
DomainsCustom domain, verification state, DNS guidance
Expected public refresh: Host routing, callbacks, domain diagnostics
ProductsPrice, inventory, visibility, media, variant
Expected public refresh: Shop grid, product detail, cart validation, checkout
BookingsService, duration, price, staff, availability
Expected public refresh: Booking service list, detail, time slots
PagesDraft publish, navigation, static content
Expected public refresh: Public pages, sitemap, navigation
FormsSchema, publish state, notification owner
Expected public refresh: Public form load and submission behavior
Help and KBArticle, category, help settings
Expected public refresh: Help center and knowledge article routes
MediaUpload, replace, delete
Expected public refresh: Public images and generated previews
SettingsPolicies, site status, checkout settings
Expected public refresh: Public routing, policies, checkout behavior
StripePayment, invoice, checkout, subscription, account
Expected public refresh: Order, booking, billing, and payment status
ShippingLabel, rate, tracking, fulfillment status
Expected public refresh: Order fulfillment and tracking state
Webhook delivery should be authorized, idempotent, replay-safe, and scoped to the workspace before it changes public state.
Editor APIs
Console and sites expose editor APIs for authenticated operator actions. These APIs should be used through the console/editor fetchers and service layer, not through unauthenticated public calls.
Use editor APIs only from authenticated operator surfaces because they can change workspace configuration, content, media, and launch-critical records. If a public customer flow needs the same data, expose a customer-safe read path instead of reusing an editor route.
Public APIs
Sites exposes public or customer-facing APIs for flows such as:
- Bookings.
- Checkout.
- Orders.
- Profile.
- Forms.
- Contact.
- Help.
- Reviews.
- Search.
- Tickets.
These APIs must resolve the workspace from the tenant context and should not trust client-supplied tenant identity by itself.
Domain Troubleshooting
Start with the final customer URL, not the console preview URL. Capture the host, path, DNS provider, verification state, and the workspace slug the domain should resolve to before changing records.
Domain shows wrong site
DNS, domain mapping, site slug, selected workspace
Domain not verified
Missing records, proxied records, provider propagation
Email not delivered
MX, SPF, DKIM, sender identity, provider proxy
Public page stale
Webhook category, cache tag, revalidation route
Checkout wallet unavailable
Payment method domain and provider verification
Safe Change Protocol
- Change one domain, DNS, or webhook setting at a time.
- Verify from the final customer URL.
- Confirm public technical routes.
- Test the customer flow that depends on the change.
- Keep rollback simple: restore previous DNS, disable the feature, or set the site to protected while investigating.
Domain and webhook changes can make a healthy workspace appear broken from the outside. Record the previous value, the exact DNS or route change, the expected propagation window, and the rollback owner before editing production routing. After the change, test the final host, auth callback, sitemap, social preview, and one customer action.