Free web tool

nginx redirect generator

Generate nginx 301/302 redirect rules.

Input & settings

How to use

Generate nginx 301/302 redirect rules.

  1. Enter or select the source data.
  2. Change only the settings you need.
  3. Run the tool, then copy or save the result.

Avoid redirect loops in nginx

Before adding redirect or rewrite rules, check whether the destination can match the same rule again. Combining http-to-https, www normalization, trailing slashes, and legacy URL redirects can easily create loops. Test the final Location header in staging or with curl before applying the configuration broadly.