301 Permanent Redirect Generator
FreeGenerate 301 permanent redirect rules for Apache .htaccess, Nginx, and Vercel. Preserve link equity when moving pages or restructuring your website.
What's next
Settings guide
When to use 301 vs 302:
- ·301 Permanent: Site migrations, URL restructuring, domain moves, merging duplicate pages. Link equity transfers fully.
- ·302 Temporary: A/B testing alternate URLs, seasonal promotions, maintenance pages, split testing. Link equity stays at the original URL.
- ·307 Temporary (HTTP/1.1): Same as 302 but preserves the HTTP method. Use instead of 302 for modern servers.
Apache .htaccess format:
Redirect 301 /old-path https://domain.com/new-path
Or with mod_rewrite: RewriteRule ^old-path/?$ /new-path [R=301,L]
Nginx format:
return 301 https://domain.com/new-path; (inside a location block)
Vercel (vercel.json):
{ "source": "/old-path", "destination": "/new-path", "permanent": true }
Redirect chains:
Never create chains — A → B → C. Chains lose link equity at each hop and slow page load. After creating redirects, audit for chains and consolidate: A → C directly.
Format comparison
301 redirect vs canonical tag:
A canonical tag tells Google which version of a page is preferred — the original still exists and is served. A 301 redirect replaces the old URL entirely and sends users and crawlers to the new URL. For duplicate content between URLs, a 301 is a stronger consolidation signal than a canonical tag.
301 redirect vs .htaccess rewrite:
A basic 301 redirect rule in .htaccess (Redirect 301) is simpler and sufficient for most use cases. An .htaccess RewriteRule with mod_rewrite is required for pattern-based redirects (wildcards, regex), trailing slash normalization, and complex URL transformations. This generator supports both formats.
How it works
Enter your URL pairs
Add your old (source) URLs and their corresponding new (destination) URLs.
Select server format
Choose Apache .htaccess, Nginx, or Vercel based on your server stack.
Review the redirect rules
Preview the generated rules and confirm each source-destination pair is correct.
Deploy and verify
Add the rules to your server config, then test each redirect with a browser or HTTP status checker.
About this format
A 301 redirect is the HTTP status code for a permanent page move. When a user or search engine crawler requests the old URL, the server responds with "301 Moved Permanently" along with the new URL location. The browser and crawler follow the redirect automatically. For SEO, a 301 redirect signals to Google that the old URL's ranking signals — backlinks, PageRank, authority — should transfer to the new URL.
Using the wrong redirect type is a common SEO mistake. A 302 (temporary) redirect does not transfer link equity and tells Google the original URL may return. Using no redirect at all leaves a broken link that returns 404, destroying the link equity that page had accumulated. A 301 is the correct choice for any permanent page move, URL restructuring, domain migration, or site consolidation.
This generator produces properly formatted 301 redirect rules for Apache (.htaccess), Nginx server blocks, and Vercel configuration files. Paste in your source and destination URL pairs, select your server type, and download the ready-to-deploy redirect rules.