URL Redirect Generator
Generate 301, 302, 307, and 308 redirect rules for Apache (.htaccess), Nginx, PHP, HTML, JavaScript, and WordPress.
TL;DR: URL Redirect Generator is a free, browser-based tool that lets you generate 301, 302, 307, and 308 redirect rules for Apache (.htaccess), Nginx, PHP, HTML, JavaScript, and WordPress.
Advanced Configuration Options
.htaccess file before any CMS routing blocks.What Is the URL Redirect Generator?
URL Redirect Generator creates server redirect rules for Apache (.htaccess), NGINX (nginx.conf), Cloudflare, and Node.js servers, formatting 301 and 302 redirect rules with exact regex path matching.
Step-by-Step: Using This Tool
- Enter the old source path (e.g. `/old-page`) and target destination URL (e.g. `/new-page`).
- Select redirect type: 301 Permanent or 302 Temporary.
- Choose server platform: Apache, NGINX, or Cloudflare Page Rules.
- Copy the generated server configuration code.
Maximize Your Results
- Apache RewriteRule Standard: Generates clean `RewriteRule ^old-path/?$ /new-path [R=301,L]` syntax.
- NGINX Syntax: Produces performant `rewrite ^/old-path/?$ /new-path permanent;` directives.
- Preserve Query Strings: Option to append or strip tracking query parameters during redirection.
Related Guides & Tutorials
- What Is Schema Markup Json Ld — Learn in-depth concepts, best practices, and expert tips.
- Robots Txt Rules Best Practices — Learn in-depth concepts, best practices, and expert tips.
100% Client-Side Privacy Guarantee
All processing runs locally inside your browser using JavaScript and HTML5 APIs. Your data, files, and inputs are never uploaded to any remote server. Complete privacy by design.
Frequently Asked Questions
- A 301 redirect is a permanent server-side status code indicating that a resource has moved permanently to a new URL. Search engines like Google transfer between 90% and 99% of the original page's ranking authority (PageRank) and backlink equity to the destination URL.
- A 301 redirect tells search crawlers to permanently index the new URL and pass ranking signals. A 302 redirect indicates a temporary move, instructing crawlers to keep the old URL indexed in search results.
- Both indicate a permanent move and pass link equity. However, a 301 redirect historically allows browsers to switch HTTP POST requests to GET requests, while a 308 redirect strictly forbids changing the HTTP request method (e.g. POST requests remain POST).
- Add generated redirect directives to the root .htaccess file in your website's public HTML directory (e.g. /public_html/.htaccess). Ensure rules are placed above any default WordPress or CMS rewrite blocks.
- Yes. A redirect loop occurs when Page A redirects to Page B, and Page B redirects back to Page A. Our generator performs automated conflict detection to prevent loop configurations.
Cite This Tool
Referencing this tool in a paper, article, or bibliography? Copy a ready-made citation below.
Embed This Tool
Add the live URL Redirect Generator tool to your own website with this snippet — it loads the real, working tool in an iframe, not a static screenshot.
<iframe src="https://nexlove.org/embed/url-redirect-generator.html" width="100%" height="600" style="border:1px solid #e2e8f0;border-radius:12px" title="URL Redirect Generator — NexLove.org" loading="lazy"></iframe>