.htaccess Generator

Generate .htaccess rules for HTTPS and www redirects, 301 redirects, sitemap, caching and security. Copy and paste into your Apache server.

Generators Free, no sign-up

.htaccess generator for redirects and common errors

Generate .htaccess rules to fix 403, 404 and 500 errors, force HTTPS, create 301 redirects and improve security on Apache.

Redirects (SEO)


301 redirect (old URL → new)

Sitemap / errors / security


Caching (basic)

Result:

Tip: for a single redirect with more options, use the 301 and 302 redirect generator.

Frequently asked questions

Where do I put the .htaccess file?

Usually in the public folder of the site (public_html, www or /public). In projects with routes, put it in the folder Apache serves the site from.

Can I use all options at the same time?

Yes, but carefully. Avoid duplicate rules, such as two different rules for HTTPS and www.

Can .htaccess cause a 500 error?

Yes, when there is invalid syntax or a directive your host does not allow. If it happens, rename the .htaccess file to test and review the rules.

Does it work on Nginx?

No. .htaccess is an Apache feature. On Nginx you need to add the rules to the server block of the configuration.

Need a full technical SEO review of your site?

We find what holds your site back on Google (broken links, redirects, slow pages, indexing problems) and fix it.

Technical consulting