Free online Netlify redirect generator. Create redirects for your Netlify site in both _redirects and netlify.toml formats. Support for wildcards, conditions, split testing, and more.
Netlify redirects can be configured in two formats: _redirects
file or netlify.toml
. Both support the same features but serve different use cases. The _redirects file is simpler and easier to maintain for basic redirects, while netlify.toml is better for complex configurations and when you need to version control your redirects with your code.
301
- Permanent redirect (best for SEO)302
- Temporary redirect200
- Rewrite rule (URL doesn't change)404
- Force a not found response401
- Force an unauthorized responseHere are some common redirect patterns:
/old-page /new-page 301
- Simple permanent redirect/blog/* /news/:splat 301
- Redirect with path preservation/app/* /login 401! Role=anonymous
- Role-based access control/ /uk 302 Country=gb
- Country-based redirectNetlify redirects are rules that tell Netlify how to handle requests to your site. They can redirect old URLs to new ones, set up URL rewrites, handle country-based redirects, and more. You can configure them using either a _redirects file or netlify.toml configuration.
_redirects is a simple text file format that's easy to read and write, while netlify.toml is a more structured format that can include other Netlify configurations. Both support the same redirect features, but netlify.toml is preferred for complex configurations.
Our tool supports all Netlify redirect types including permanent (301) and temporary (302) redirects, proxying (200), forced redirects, wildcard redirects, splat redirects, country/language-based redirects, role-based access, and split testing configurations.
For _redirects format, place the file in your site's publish directory (usually 'public' or 'dist'). For netlify.toml, place it in your project's root directory. Netlify will automatically detect and implement your redirect rules when you deploy.
Yes, Netlify supports wildcards (*) to match any number of characters and placeholders (:placeholder) to capture and use parts of the URL in your redirects. Our tool helps you create these patterns correctly.
Redirect conditions let you apply rules based on factors like country, language, or user role. For example, you can redirect users from specific countries to localized versions of your site, or restrict access to certain paths based on user roles.