Routing overview

Routing allows you to manage the traffic to and from your Netlify site.

You can enable powerful static routing features like redirects, rewrites, and proxies by defining rules in a site's _redirects file or Netlify configuration file. As requests come in from site visitors, our CDN edge nodes evaluate these rules, pointing visitors to different paths or rewriting paths based on options or conditions like preferred language or current location. Rules can proxy an incoming request to another website or to execute a Netlify serverless function.

You can also define custom headers sent in response to site requests. These are controlled in a _headers file or Netlify configuration file for each Netlify site.

While static traffic routing and custom header configuration can be very convenient for the majority of use cases, managing the rule set may become more challenging as it grows in complexity and size. To dynamically affect traffic on your site, Netlify Edge Handlers build on our static routing capabilities to run custom JavaScript from CDN edge nodes. Edge Handlers can act as HTTP filters for your incoming traffic and give you full control to manipulate HTTP requests and responses.