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.
The URL Map options surface what is currently documented in the Google Cloud reference for that service. When Google adds a new property or value, we add it here after verifying the schema in a real project. If a recently-announced feature is not yet selectable, treat that as a 'not yet supported' signal rather than an opinion that it should not be used.
No — generating a URL Map configuration is independent of the IAM roles required to apply it. Apply the output with a principal that has the documented permissions for that service. For least-privilege scoping, GCP's Policy Intelligence and the Role Recommender produce permission lists scoped to actual usage.
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.