387+ free calculators — no sign-up, no ads, no paywalls. Browse all tools →
Start typing to search...
Redirect code generator

Website Redirect Generator

Generate redirect code for websites quickly. Create 301 permanent redirects, 302 temporary redirects, PHP redirects, HTML meta refresh, JavaScript redirects, Nginx redirects, canonical tags, and .htaccess rules.

PHP Redirect .htaccess HTML / JS

Create clean redirect code

Useful for SEO redirects, old page migration, domain changes, affiliate pages, landing pages, and URL forwarding.

Free Website Redirect Generator Tool

Enter old and new URLs, choose redirect type, and generate ready-to-use redirect code instantly.

Redirect Settings

For .htaccess, you can use only path like /old-page.
Use full destination URL for best results.
Select the code type you need.
Used for HTML meta and JavaScript redirect.
This updates the recommendation text.

Generated Code

Redirect Code
.htaccess
301 Redirect Type
Not set Source
Not set Destination
SEO Safe Recommendation

Redirect Preview

Old URL Not set
New URL Not set
Redirect Method .htaccess 301 Redirect
Best Use Best for permanent SEO page migration.

Quick Redirect Examples

Use 301 redirects for permanent SEO moves and 302 redirects for temporary forwarding. Always test redirect code after adding it to your server.

Why Use a Website Redirect Generator?

A website redirect generator helps you create correct redirect code without writing server rules manually.

SEO Redirects

Generate 301 redirects for old pages, changed URLs, deleted posts, and website migrations.

Multiple Code Types

Create .htaccess, PHP, HTML meta refresh, JavaScript, Nginx, and canonical code from one tool.

Copy Ready Code

Copy or download generated redirect code and place it in the right file on your website.

What Is a Website Redirect?

A website redirect sends visitors and search engines from one URL to another URL. Redirects are important when a page URL changes, a website moves to a new domain, HTTP changes to HTTPS, or duplicate URLs need one main version.

The most common redirect for SEO is a 301 redirect because it tells search engines that the move is permanent. A 302 redirect is better for temporary campaigns, testing pages, maintenance pages, or short-term forwarding.

Redirect Type Best For Where to Use
301 Redirect Permanent URL changes .htaccess, PHP, Nginx
302 Redirect Temporary forwarding .htaccess, PHP, Nginx
HTML Meta Refresh Simple page-level redirect HTML head section
JavaScript Redirect Browser-side forwarding Page script area
Canonical Tag Duplicate URL signals HTML head section

How It Works

Generate website redirect code in three simple steps.

Add URLs

Enter the old URL or source path and the new destination URL where traffic should go.

Choose Redirect Type

Select .htaccess, PHP, HTML meta refresh, JavaScript, Nginx, or canonical redirect code.

Copy Code

Copy or download the generated code and place it in the correct file on your server.

Website Redirect Generator FAQs

Common questions about 301 redirects, 302 redirects, SEO, and redirect code placement.

A website redirect generator creates ready-to-use redirect code for .htaccess, PHP, HTML, JavaScript, Nginx, and canonical tags.
Use 301 for permanent URL changes and SEO migrations. Use 302 for temporary redirects, campaigns, maintenance pages, or testing.
Add .htaccess redirect code inside the .htaccess file in your website root folder, usually public_html on cPanel hosting.
Server-side 301 redirects are better for SEO. JavaScript redirects should be used only when server redirects are not possible.
No. This tool only generates redirect code. You must copy the code and add it to your website files manually.