Skip to content
SimpleConvertSimpleConvert

URL Redirect Generator

Generate an nginx server-block redirect with the status code of your choice — the fastest kind of redirect there is, handled before any application code runs.

How to use it

  • Enter the destination — and the old path where the method needs one.
  • Choose 301 for a permanent move or 302 for a temporary one.
  • Copy the generated code into the right place for your server or page.

This generates a redirect rule for an nginx server block — a return directive inside a location match, sending the status code and destination straight from the web server itself, before nginx has read or served a single byte of page content. It is the fastest kind of redirect there is: no HTML downloads, no script executes, nothing renders and is then discarded.

Set the old path as the location match and the destination as the target, choose 301 for a permanent move or 302 for a temporary one, and drop the returned block into the relevant server {} section of your nginx config, then reload nginx for it to take effect.

Why a server-level redirect beats a page-level one

A meta refresh or JavaScript redirect has to load a whole page first — parse the HTML, run any scripts — before it can send the visitor onward, and search engine crawlers have to do the same work and interpret the intent themselves. A server redirect is unambiguous: the HTTP response itself carries the status code and destination, so browsers and crawlers alike act on it immediately with nothing to render and discard.

Questions people ask

Why is a server redirect better than a page-level one?

It happens before any HTML is sent, so there is no download, no render and no flash of the wrong page. It is also unambiguous to search engines.

Is anything uploaded?

No. Everything runs in your browser — no file, image or snippet you use here ever leaves your device.

Runs entirely in your browser. Nothing you type is uploaded, logged or shared.

Last updated 22 August 2026