htaccess Redirect Generator
Build Apache .htaccess 301 and 302 redirect rules.
Redirect type
From (old path)To (new path or URL)
.htaccess
# Redirect rules — place in your site's .htaccess (mod_alias) Redirect 301 /old-page /new-page Redirect 301 /blog/old-post https://example.com/blog/new-post
How .htaccess redirects work
On Apache servers, a .htaccess file can redirect old URLs to new ones using the Redirect directive (mod_alias). A 301 is a permanent move and passes SEO ranking to the new URL; a 302 is temporary. The from is a path on your site (starting with /); the to can be a path or a full URL. Rules are generated in your browser — paste them at the top of your .htaccess.
Related: the canonical tag generator, the robots.txt generator, and the htpasswd generator.
Related Web & SEO tools
Meta Tag Generator
Build SEO title, description, and viewport meta tags.
Open Graph Generator
Generate Open Graph and Twitter Card meta tags.
Robots.txt Generator
Create a robots.txt with allow/disallow rules.
UTM Campaign URL Builder
Append UTM parameters to build trackable campaign URLs.
Hreflang Tag Generator
Generate hreflang link tags for multilingual SEO.
Sitemap XML Generator
Build an XML sitemap from a list of URLs.
SERP Snippet Preview
Preview how your page title and meta description appear in Google search.
Meta Tag Analyzer
Paste a page's HTML head to audit its title, meta, and social tags.