Back to 31 more Developer Tools

Netlify Redirect Generator | Create Netlify Redirects & Rules

4.74(19 ratings)

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.

Redirect Rule 1


Understanding Netlify Redirects

Basic Redirects

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.

Status Codes

  • 301 - Permanent redirect (best for SEO)
  • 302 - Temporary redirect
  • 200 - Rewrite rule (URL doesn't change)
  • 404 - Force a not found response
  • 401 - Force an unauthorized response

Special Features

  • Force Flag (!) - Forces the redirect even if the destination path exists
  • Splat (*) - Captures any remaining path components (e.g., /old/* → /new/:splat)
  • Conditions - Apply redirects based on country, language, or role
  • Query Parameters - Can be preserved or modified in the redirect

Common Patterns

Here 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 redirect

Best Practices

  • Use permanent (301) redirects for SEO when URLs change permanently
  • Order your rules from most specific to least specific
  • Use force flag (!) carefully as it can override existing content
  • Test your redirects thoroughly before deploying
  • Document your redirects with comments for future reference

Frequently Asked Questions

What is a Netlify redirect?

Netlify 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.

What's the difference between _redirects and netlify.toml?

_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.

What types of redirects can I create with this tool?

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.

How do I implement these redirects on my Netlify site?

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.

Can I use wildcards and placeholders in redirects?

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.

What are redirect conditions and how do they work?

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.