Back to All Tools

Redirect Code Generator

Generate redirect code for multiple platforms including Apache (.htaccess), Nginx, JavaScript, and meta refresh. Create 301 and 302 redirects easily.

Apache (.htaccess)

# Enter source and destination URLs

Nginx

# Enter source and destination URLs

Meta Refresh

<!-- Enter destination URL -->

JavaScript

// Enter destination URL

When to Use Each Type

  • Apache (.htaccess): Most shared hosting and Apache servers
  • Nginx: Nginx web servers, often used for high-traffic sites
  • Meta Refresh: Last resort when you don't have server access
  • JavaScript: Client-side only, not recommended for SEO

How to Use This Tool

1

Enter the source URL path (e.g., /old-page/).

2

Enter the destination URL (where to redirect to).

3

Select the redirect type (301 permanent or 302 temporary).

4

Copy the appropriate code for your server type.

5

Add the code to your server configuration file.

Got Questions?

Frequently Asked Questions

Everything you need to know about our services

Still have questions?

Need More Than Just Tools?

Our SEO experts can help you implement comprehensive strategies that drive real results. Get a free consultation today.

Get Your Free Strategy Session