Adding redirect rules to .htaccess
On Apache servers, the .htaccess file's Redirect directive sends visitors - and
search engines - from an old URL straight to a new one. Add each old-path/new-path pair below, choose 301
(permanent) or 302 (temporary), and paste the generated lines directly into your site's
.htaccess file, placed above any existing RewriteRule block.
301 vs. 302: why the choice actually matters
A 301 tells browsers and search engines the move is permanent, which causes search engines to transfer the old page's accumulated ranking signals and link equity over to the new URL - this is the right choice for a page that has genuinely moved for good, such as during a site restructure or URL-slug change. A 302 signals a temporary move instead; search engines generally keep the old URL indexed rather than transferring its signals, which is correct behavior for something like a short-term maintenance redirect, but the wrong choice if the move is actually permanent.
Why placement in the file matters
Apache processes directives from different modules - mod_alias (which provides the simple
Redirect directive this tool generates) and mod_rewrite (which provides
RewriteRule) - and these can conflict or produce unexpected results if ordered incorrectly.
Placing simple Redirect directives near the top of the file, before any RewriteEngine/RewriteRule block,
avoids that class of problem.
Common reasons to set up a redirect
A page or post has been renamed or moved to a new URL slug, an entire site has migrated to a new domain or URL structure, or an old URL has started returning a 404 that still receives real search traffic or backlinks you don't want to lose - in every one of these cases, a 301 redirect preserves that traffic and ranking value instead of letting it go to a dead end.