How to use .htaccess Generator
- Tick the options you need and enter your domain if choosing www.
- Copy the rules.
- Back up your current .htaccess, then add the rules and test every redirect.
Supported features and limitations
For Apache and LiteSpeed servers such as most shared hosting. A wrong .htaccess can take a site offline, so keep a backup. Rules are a starting point, not a substitute for testing.
Privacy
Everything you type is processed locally in your browser and is not sent to our servers. No account is needed and there is no watermark.
Frequently asked questions
Is this for WordPress?
WordPress adds its own block to .htaccess; place these rules above it.
Does it work on Nginx?
No. Nginx uses a different configuration format.
Related tools
- Robots.txt Generator - Create a robots.txt file with allow or block rules, disallowed paths and your sitemap URL.
- HTTP Status Code Reference - Search a quick reference of common HTTP status codes with plain-English meanings.
- XML Sitemap Generator - Build a valid XML sitemap from a list of URLs, with an optional lastmod date.
- JSON Formatter & Validator - Format, minify and validate JSON with clear errors.
- URL Encoder / Decoder - Encode or decode URLs and query strings.
- Color Converter - Convert between HEX, RGB and HSL colours.