.htaccess Editor

WWW Redirection
Redirect Type:
Enter your root domain. Do NOT include http:// or www.
301 Redirect (Permanent)
What to redirect:
Browser Caching (Expires Headers)
Omit leading "." (e.g., `css, js, jpg`).
Cache Type:
Forces browser to revalidate cached content with server.
Password Protect
Absolute path to your .htpasswd file. This file must be outside your web root for security.
Prevent Hotlinking
Enter your domain name to allow hotlinking from your own site.
URL to an image that will be shown instead of the hotlinked one.
Custom Error Pages

Enter the paths to your custom error pages, relative to your web root (e.g., /errors/404.html). Leave blank to use server defaults.

IP Restriction (Block or Allow)
List IPs or IP ranges to deny access. Example: `1.2.3.4`, `1.2.3.0/24`.
List IPs or IP ranges to grant access. Only use with "Deny from all" or "Require all denied".
Restriction Mode:
If blocking, allow all by default, then deny listed. If allowing, deny all by default, then allow listed. Combining both requires careful configuration.
Block Unwanted Bots / User-Agents
Enter parts of user-agent strings to block. Case-insensitive.
Change Default Directory Page
E.g., `myindex.html`, `home.php`. Overrides `index.html`, `index.php`.
Prevent Viewing of .htaccess File
Highly recommended for security. Prevents browsers from accessing files starting with a dot.
Prevent Directory Listing
Prevents visitors from seeing a list of files in directories without an index file (e.g., index.html). Highly recommended.
This area will display the generated .htaccess code. You can also paste your existing .htaccess content here for formatting or minification.

Did this tool work as expected?