Skip to content
tecuy
SEO & Webmaster

Redirect Rule Generator

Generate exact-path 301/302 redirect rules for Apache (.htaccess) and Nginx from known-correct templates — never arbitrary, unvalidated server config.

Rule 1
What this generates

Each rule becomes an exact-path redirect — Redirect 301 /old /new for Apache's mod_alias, or a location = block returning the same status code for Nginx. This deliberately does not support regex rewrite rules, wildcard matching, or arbitrary server directives — only known-correct, exact-match redirects built from your source and destination values. A 301 tells crawlers and browsers the move is permanent (search engines transfer ranking signals to the new URL); a 302 signals a temporary move and should not be used for a permanent restructure.

Query strings behave differently between the two outputs for the same rule: Apache's Redirect directive automatically forwards the original request's query string to the destination, but the Nginx template above does not — a request to /old?ref=email keeps ?ref=email on Apache, but arrives at the destination with no query string at all on Nginx. Don't assume the two are equivalent if your links carry query parameters.

Generated entirely in your browser — nothing you enter here is sent to a server, and no live site is checked or modified.

Generates ready-to-use redirect rules for the two most common web servers — Apache (.htaccess) and Nginx — from a source path, destination, and redirect type. Every rule is built from a fixed, verified template; nothing you type is inserted into the server config as raw, unvalidated text.

Use a 301 (permanent) redirect when a page has moved for good — search engines transfer most of the old URL's ranking signal to the new one. Use a 302 (temporary) redirect only for a short-term move, since search engines keep indexing the original URL.