Skip to content
.htaccess Domain Redirect Rule BuilderSEO & Web

.htaccess Domain Redirect Rule Builder

Create reviewed host-scoped Apache redirect snippets with path preservation and temporary or permanent responses.

Loading Tool…

What Is the .htaccess Domain Redirect Rule Builder?

A client-side Apache mod_rewrite snippet generator for moving one domain to an HTTPS destination. It validates the source hostname, rejects obvious same-host loops and offers path preservation with temporary 302 or permanent 301 responses.

How It Works

Enter the old hostname and HTTPS destination. Keep temporary 302 while testing. Copy the snippet into a backed-up .htaccess file before application rules rather than replacing the entire configuration. Test root, nested-path and query-string requests, then switch to 301 when ready.

When to Use It

Prepare a domain migration on Apache-compatible hosting. This tool does not inspect or change your server. Hosting-specific rules, proxies, WordPress and existing redirects may require adaptation.

Frequently Asked Questions

Does The Old Domain Need HTTPS?
Yes, visitors using an HTTPS source URL need a valid source certificate before the server can deliver a redirect.
Are Paths And Queries Preserved?
The path is preserved when that option is enabled, and the original query string is preserved. A destination path is used as a prefix. Redirect chains and existing configuration still need testing.

Found an issue? Send Feedback. See our data sources and update policy for tools that depend on changing information.