.htaccess Generator for Drupal
Create permanent 301 redirects for Apache servers to preserve SEO juice when moving pages or domains.
.htaccess Output
# 301 Redirects
Frequently Asked Questions
What is a 301 redirect?
A 301 redirect is a permanent redirect from one URL to another. It tells search engines that a page has moved permanently, and they should pass the SEO ranking power (link equity) from the old page to the new one.
When should I use Redirect 301 vs RewriteRule?
Redirect 301 is a simple Apache directive from the mod_alias module. It's best for straightforward 1-to-1 page redirects (e.g., redirecting /old.html to /new.html).
RewriteRule belongs to mod_rewrite and supports Regular Expressions. It is much more powerful and is used for complex pattern matching, query string redirects, or redirecting entire directories dynamically.
Where do I put these redirect rules?
You need to copy the generated rules and paste them into a file named .htaccess in the root directory of your website (e.g., public_html or www). Note: this only works if your website is hosted on an Apache web server.
More Free Tools
Get your SEO Checklist
Get the Ultimate 2026 SEO Checklist
50 actionable steps to rank your site on page 1. Drop your email to unlock it instantly.