Redirect Generator - Create 301/302 Redirects

Generate redirect rules for Apache, Nginx, and meta tags

Generate Redirect Rules

Create redirect rules for Apache, Nginx, JavaScript, PHP, and more. Choose your redirect type and get instant code.

Redirect Type

Generated Code

.htaccess (Apache)
Enter URLs to generate redirect rules...
Nginx Config
Enter URLs to generate redirect rules...
JavaScript
Enter URLs to generate redirect rules...
PHP
Enter URLs to generate redirect rules...
HTML Meta Refresh
Enter URLs to generate redirect rules...
Cloudflare _redirects
Enter URLs to generate redirect rules...

About Redirect Status Codes

301 Permanent Redirect

Use when a page has permanently moved. Search engines will update their index to the new URL and transfer SEO value. Browsers cache 301 redirects aggressively.

302 Temporary Redirect

Use for temporary changes where the original URL will be restored later. Search engines keep the original URL in their index and do not transfer SEO value.

307 Temporary Redirect (Preserve Method)

Like 302 but guarantees POST requests stay POST. Use when redirecting API endpoints or form submissions temporarily.

Frequently Asked Questions

What is the difference between 301 and 302 redirects?

A 301 redirect indicates a permanent move. Search engines will update their index to the new URL and transfer SEO value. A 302 redirect is temporary - search engines keep the original URL indexed and do not transfer SEO value.

Do redirects affect SEO?

Yes. 301 redirects pass most SEO value (PageRank, backlinks) to the new URL, typically 90-99%. 302 redirects do not transfer SEO value because search engines expect the original URL to return.

Should I use server-side or client-side redirects?

Always prefer server-side redirects (Apache, Nginx, PHP) for SEO and performance. Client-side redirects (JavaScript, meta refresh) may not be followed by search engines and are slower.

How do I redirect an entire domain?

For Apache, use: Redirect 301 / https://newdomain.com/. For Nginx, use: return 301 https://newdomain.com$request_uri;. This redirects all pages from the old domain to the corresponding path on the new domain.

Privacy & Limitations

  • All calculations run entirely in your browser -- nothing is sent to any server.
  • Results are computed locally and should be verified for critical applications.

Related Tools

Related Tools

View all tools

Redirect Generator FAQ

What is Redirect Generator?

Redirect Generator is a free developer tools tool that helps you Generate 301/302 redirect rules for Apache, Nginx, and more.

How do I use Redirect Generator?

Enter your input values, review the calculated output, and adjust inputs until you reach the result you need. The result updates in your browser.

Is Redirect Generator private?

Yes. Calculations run locally in your browser. Inputs are not uploaded to a server by default, and refreshing the page clears session data.

Does Redirect Generator require an account or installation?

No. You can use this tool directly in your browser without sign-up or software installation.

How accurate are results from Redirect Generator?

This tool applies standard formulas or deterministic processing logic for estimates. For medical, legal, tax, or investment decisions, verify with a qualified professional.

Can I save or share outputs from Redirect Generator?

You can bookmark this page and copy outputs manually. Results are not persisted in your account and are typically not embedded in the URL.

Request a New Tool
Improve This Tool