Tools menu
Free tool
301 Redirect Code Generator
Generate 301 or 302 redirect code for Apache (.htaccess), Nginx or Netlify, or an HTML meta refresh, to keep rankings when URLs change.
301 Redirect Rules
Crawl Budget Preservation
Your generated code will appear here
Deployment Note
Apache: Paste into the `.htaccess` file in your site root, above any CMS rules (such as the WordPress block). Requires `mod_rewrite`. Each rule matches the path with or without a trailing slash; query strings are passed through.
Nginx: Place inside your `server ` block and reload Nginx for changes to take effect.
How to use this tool
Follow these steps to get the most out of the 301 Redirect Code Generator.
Enter your accurate data in the provided form fields.
Review all configuration options and settings.
Click the generate or proceed button to execute.
Copy, download, or implement the professional output.
In depth
Technical SEO Guide to 301 Redirects
A 301 redirect permanently points an old URL to a new one, and Google passes the old URL's ranking signals to the new one. Use this page to generate the rule for Apache, Nginx or Netlify, or a meta refresh when you can't change the server.
Crawl Budget Optimization
Avoid 'Redirect Chains' (Page A -> Page B -> Page C). Every hop in a chain consumes more crawl budget and delays the user experience. Always redirect directly to the final destination URL.
Server-Side Implementation
Server-side redirects are the most reliable signal. Google also follows an instant meta refresh as a redirect, but use one only when you can't change the server configuration.
Want it done for you?
Moving to a new site or platform? We rebuild sites and migrate them without losing the rankings you've earned.
Website Design & DevelopmentMore in Redirects & Migrations