About 301 Redirect Generator
Redirects keep visitors and search rankings when URLs change: after a redesign, a move to HTTPS, a switch between www and the bare domain, or when old product pages are merged. Type or paste the old and new addresses, one pair per line with a space between them, then choose 301 for a permanent move or 302 for a temporary one. Before you force HTTPS, make sure the certificate is valid with the SSL Certificate Checker.
The rules come in six forms: Apache .htaccess (Redirect or RewriteRule), Nginx, IIS web.config, PHP header(), an HTML meta refresh and JavaScript. Site-wide rules force HTTPS, send www to the bare domain, or the bare domain to www. Use a server rule whenever you can, and keep meta refresh and JavaScript for hosts where you can't touch the configuration: those two go on the old page itself, so they use the first pair. After uploading, follow each hop with the Redirect Checker. The code is generated in your browser, so your URL lists aren't uploaded.
How to use 301 Redirect Generator
- 1Enter old and new URLs
Put one redirect per line, the old address first and the new one after a space.
- 2Choose 301 or 302
301 for pages that have moved for good, 302 for a temporary change.
- 3Copy the code for your server
Take the Apache, Nginx, IIS, PHP, meta refresh or JavaScript version, and add HTTPS or www rules if needed.
- 4Test the redirects
Upload the rules and check each old URL with the Redirect Checker.
Why use Cubfile for this
- Six outputs
Apache .htaccess, Nginx, IIS web.config, PHP, HTML meta refresh and JavaScript.
- Bulk lists
Paste a whole list of old and new pairs at once, one pair per line.
- Site-wide rules
Force HTTPS, redirect www to non-www, or non-www to www.
- Runs locally
Your URL lists stay in your browser. Nothing is uploaded and there's no limit.