# Redirect rule generator

> Create common server redirect snippets and local pattern examples.

[Open tool](https://www.toolcabana.com/rm/redirect-rule-generator) · [Web publishing and marketing](https://www.toolcabana.com/rm/category/web-publishing-and-marketing)

Tool ID: redirect-rule-generator. Requested language: rm. Description language: en. Complete guide translation: no; untranslated sections use English.

## Overview (en)

Redirect Rule Generator converts a list of old and new paths into redirect rules for nginx, Apache or Netlify. Enter one old path and new path per line, separated by a comma, up to 1000 lines, and choose a 301 or 302 status. Each new path is joined to your destination base URL, and only literal paths are accepted, so wildcards and regex patterns are rejected.

## Supported tasks (en)

Create common server redirect snippets and local pattern examples.

## Steps (en)

1. Paste the source into the input editor, or load the built-in example.
2. Adjust the basic settings, then open Advanced mode for export and fine-tuning options. Custom settings stay active when the panel is closed.
3. Run redirect rule generator, review the output, then use the available copy or download controls.

## Settings

- Server (en; key: target; type: select): nginx [en], Apache [en], Netlify [en]
- Destination base URL (en; key: destination; type: text)
- Status (en; key: status; type: select): 301 [en], 302 [en]

## Limitations (en)

CSV/XLSX inputs are capped at 10 MB each, 200 columns and 20,000 rows; joined output is capped at 20,000 rows. JSONPath script/filter evaluation is disabled. Other operations apply their visible controls and text limits.

## Example input

```text
/old-page,/new-page
/old-tools,/tools
```

## Privacy and connections (en)

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

## Questions (en)

### What does an nginx redirect from this generator look like?

Each line becomes an exact-match location block that returns the chosen status and full destination, such as location = /old-page { return 301 https://example.com/new-page; }. Apache output uses Redirect 301 lines, and Netlify lines list path, URL and status.

### Should I choose a 301 or 302 redirect?

Use 301 for a permanent move and 302 for a temporary one. The status you pick is written into every generated rule, so create separate batches if some redirects are permanent and others temporary.

### Why does the redirect generator reject my paths?

Paths must start with a slash and contain only letters, digits, slashes, dots, dashes, percent signs and underscores. Query strings, spaces, wildcards and regex characters are refused, and the destination must be a plain HTTP or HTTPS URL.

### Where is my input processed?

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

### What are the input limits?

CSV/XLSX inputs are capped at 10 MB each, 200 columns and 20,000 rows; joined output is capped at 20,000 rows. JSONPath script/filter evaluation is disabled. Other operations apply their visible controls and text limits.

## Related tools

- [JSON-LD schema generator](https://www.toolcabana.com/rm/json-ld-schema-generator)
- [Hreflang tag generator](https://www.toolcabana.com/rm/hreflang-tag-generator)
- [SERP snippet preview](https://www.toolcabana.com/rm/serp-snippet-preview)
- [Keyword list grouper](https://www.toolcabana.com/rm/keyword-list-grouper)
