How to Set Up 301 Redirects (.htaccess Guide)
When you move, rename, or delete a page, a 301 redirect forwards visitors (and search engines) to the new location — preserving the SEO value the old URL earned. Skipping this loses rankings and creates 404s.
301 vs 302
301 = permanent (the page has moved for good — passes SEO value). 302 = temporary (don't use it for permanent moves; it doesn't transfer ranking the same way). For almost all migrations, you want 301.
The .htaccess way (Apache)
On Apache servers (like most shared hosting), redirects go in the .htaccess file:
Redirect 301 /old-page /new-page
Or with mod_rewrite for patterns. One mistake (a typo or a loop) can break the site, so generate them carefully.
Generate them safely
Our free .htaccess redirect generator builds correct redirect rules from simple inputs. Pair it with the broken link checker to catch URLs that need one.
Bottom line
Use 301 (permanent) redirects whenever a URL changes, to keep both visitors and rankings. On Apache/shared hosting they live in .htaccess — generate them carefully to avoid loops, and your site reorganisations won't cost you SEO.