What is a Site?
A site in smoxy is a reusable configuration that you assign to one or more domains. Instead of managing each domain individually, you group domains under a site so they all share the same settings for caching, security, optimization, and routing.
How Sites Work
- Create a site with your desired settings (caching, security, image optimization, etc.)
- Assign domains to the site -- each domain inherits the site's configuration
- Manage centrally -- changes to the site apply to all assigned domains
For example, you could assign www.example.com, shop.example.com, and blog.example.com to the same site. All three domains would share identical caching, security, and optimization settings.
What You Can Configure
A site controls every aspect of how smoxy handles traffic for its assigned domains:
| Feature | What It Does | Learn More |
|---|---|---|
| Origin / Load Balancer | Where smoxy sends traffic -- a single server or a pool of servers | Basic Configuration |
| Caching | How long content is cached, cache key composition, cache tags, stale cache behavior | Advanced Caching |
| Image Optimization | Automatic compression, WebP/AVIF conversion, quality settings per format | Image Optimization |
| Acceleration | HTML caching and minification for faster page delivery | Acceleration |
| Security & WAF | Web Application Firewall, access rules, Basic Auth, Under Attack Mode | Security & WAF |
| Custom Pages | Branded error, security, and maintenance pages | Custom Pages |
| Rules | Override any site setting based on request conditions (URL, country, headers, etc.) | Rules Overview |
| Headers | Add or modify request and response HTTP headers | Basic Configuration |
Common Patterns
One Site Per Environment
Create separate sites for production, staging, and development. Each environment gets its own caching, security, and optimization settings.
| Site | Domains | Settings |
|---|---|---|
| Production | www.example.com, shop.example.com | Aggressive caching, WAF enabled, image optimization on |
| Staging | staging.example.com | Short cache TTL, WAF enabled, debug headers on |
| Development | dev.example.com | No caching, WAF off, debug headers on |
One Site for Multiple Domains
If several domains serve the same type of content with the same requirements, assign them all to one site. This avoids duplicating configuration.
Switching Configurations
You can reassign a domain to a different site at any time. The domain immediately inherits the new site's settings -- no need to reconfigure anything manually.
Sites vs. Redirect Sites
smoxy has two types of sites:
| Type | Purpose |
|---|---|
| Site | Full configuration -- caching, security, optimization, routing, rules |
| Redirect Site | Only redirects traffic to another URL -- no caching, no optimization |
Use a redirect site when you only need to forward one domain to another (e.g., redirecting example.com to www.example.com). See Redirect Sites for details.
