Build URL map routing configurations for HTTP(S) load balancers with host rules and path matchers.
Last verified: May 2026
Build URL map routing configurations for HTTP(S) load balancers with host rules, path matchers, and weighted traffic splitting.
Required Fields
namedefaultServicehostRulespathMatchersOutput will appear here...Build URL map routing configurations for HTTP(S) load balancers with host rules and path matchers. This tool helps GCP engineers generate valid configurations quickly without consulting documentation, reducing errors and accelerating infrastructure deployment. All processing runs in your browser with no data sent to external servers.
No. This tool runs entirely in your browser and generates configuration JSON that you can copy and paste into your infrastructure-as-code templates, CLI commands, or cloud console. It never connects to any cloud account or sends data externally.
The tool produces syntactically valid configurations based on current GCP service specifications. Always review generated configs against your organization security policies and test in a non-production environment before deploying.
Your team is consolidating 5 microservice load balancers behind a single global HTTPS load balancer for cost reduction (1 LB instead of 5 = $20/month saved + simpler DNS). The builder generates a URL map: host rules for each service's domain → path matcher → backend service NEG. Add HTTP→HTTPS redirect for compliance, /old-api/* → /api/v2/* rewrites for legacy clients. End-to-end consolidation in 1 day; ongoing operational burden drops to managing 1 LB instead of 5.
The builder constructs URL Map configurations: URL map resource (name, default service for unmatched), host_rules (matching specific hosts), path_matchers (with default service + path rules with route actions: weighted backends, URL rewrites, redirects, retries), and header rules (for header-based routing). Output is generated as gcloud compute url-maps commands and Terraform google_compute_url_map resources.
URL maps route requests to backend services based on host + path patterns. The order of pathRules matters — first match wins. Always place MORE specific patterns first (`/api/v1/users` before `/api/v1/*` before `/api/*` before `/*`).
Use URL rewrite + redirect actions for SEO and UX. Common patterns: redirect HTTP to HTTPS (set in load balancer, not URL map), redirect non-canonical hosts (example.com → www.example.com), rewrite legacy paths to new structure (/old-product/* → /products/*).
Header-based routing in URL maps enables sophisticated patterns: route mobile users to a mobile-optimized backend by inspecting User-Agent, route premium customers based on a custom header, A/B test by routing X% based on a hash header. Don't push this logic into application code if URL maps can handle it.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.