Renamed a post, moved a page, or changed the URL structure? A missing redirect is the single most common way a site loses rankings it already earned.
Free hosting tool
.htaccess & Nginx Redirect Generator
Build 301/302 redirect rules for Apache or Nginx. Nothing you enter is sent to a server.
Test before you trust it. A syntax error in .htaccess can 500 your whole site; a bad Nginx config will fail nginx -t and refuse to reload (safer, but check first). Keep a backup of the original file before pasting anything in.
301 vs 302, in one line
Use 301 when a page has moved for good, it passes ranking signals to the new URL and browsers may cache it. Use 302 only when the move is temporary and you plan to reverse it, since nothing transfers permanently and the old URL stays the one search engines trust.
Redirect generator FAQ
What is the difference between a 301 and a 302 redirect?
A 301 means "moved permanently": search engines transfer the old URL's ranking signals to the new one, and browsers are allowed to cache it. A 302 means "moved temporarily": nothing transfers permanently, and it should be used when you expect to move the content back, like during a short site migration or an A/B test. For a page that has permanently moved, always use 301.
Where do I paste the Apache rules?
Into your site's .htaccess file, in the root folder of your domain. On WordPress, add new redirects above the "# BEGIN WordPress" block so they take effect before WordPress's own rewrite rules run.
Where do I paste the Nginx rules?
Inside the server {} block of your site's Nginx config (commonly in /etc/nginx/sites-available/), then reload Nginx with a config test first (nginx -t) since a syntax error in this file can take the whole site down.
Why does the Nginx output use "return" instead of "rewrite"?
For a plain redirect with no pattern matching, "return" is the officially recommended approach: it skips Nginx's regex-matching engine entirely and is faster and simpler than "rewrite", which is meant for more complex URL rewriting rather than a straight A-to-B redirect.
Will this break my WordPress permalinks?
Not if you place these rules before WordPress's own block in .htaccess, or before WordPress's location block in Nginx. These rules only fire for the exact old paths you list, everything else continues to WordPress's normal routing untouched.
Is this generator private?
Yes. Every rule is generated in your browser. Nothing you enter is sent to a server.
Free redirect generator by ANUPRESS
Why a 301 protects the rankings you already have
When a page moves, search engines still have the old URL indexed with whatever authority it built up over time. A 301 tells them, unambiguously, that the content moved and the new URL should inherit that authority. Skip the redirect and visitors (and crawlers) hit a 404, the old URL’s signals don’t transfer anywhere, and you’re effectively starting that page’s ranking history over. A five-minute redirect rule is a lot cheaper than earning that back.
Where these rules actually go
For Apache, paste the generated lines into your site’s .htaccess file, in the root folder of your domain. On a WordPress site specifically, add them above the # BEGIN WordPress block so they run before WordPress’s own rewrite rules take over. For Nginx, paste the rules inside the server {} block of your site’s config, then always run nginx -t to check the syntax before reloading, a bad Nginx config refuses to reload rather than taking the site down, but only if you test first.
Why the Nginx rules use “return” instead of “rewrite”
For a straight redirect with no pattern-matching, Nginx’s own documentation recommends return over rewrite: it skips the regex engine entirely, which is both faster and less error-prone for the common case of “this exact old path goes to this exact new path.” Save rewrite for when you actually need pattern capture across many URLs at once, that’s a different tool from this one.
The two rules almost everyone eventually needs
Forcing HTTPS and picking one canonical version of your domain (with or without www) both solve the same underlying problem: the same page reachable at multiple URLs splits your ranking signals and confuses which version search engines should show. The one-click presets above add the standard rule for each, generated in the syntax that matches whichever server tab is active, so you don’t have to remember the exact regex either way.