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.
Useful for SEO redirects, old page migration, domain changes, affiliate pages, landing pages, and URL forwarding.
Enter old and new URLs, choose redirect type, and generate ready-to-use redirect code instantly.
A website redirect generator helps you create correct redirect code without writing server rules manually.
Generate 301 redirects for old pages, changed URLs, deleted posts, and website migrations.
Create .htaccess, PHP, HTML meta refresh, JavaScript, Nginx, and canonical code from one tool.
Copy or download generated redirect code and place it in the right file on your website.
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 |
Generate website redirect code in three simple steps.
Enter the old URL or source path and the new destination URL where traffic should go.
Select .htaccess, PHP, HTML meta refresh, JavaScript, Nginx, or canonical redirect code.
Copy or download the generated code and place it in the correct file on your server.
Common questions about 301 redirects, 302 redirects, SEO, and redirect code placement.