Understanding the .htaccess file
The .htaccess file is a powerful per-folder configuration file for Apache. It controls redirects, security rules, error pages and more.
Where to find it
It lives in your public_html folder. It starts with a dot, so enable Show Hidden Files in File Manager (Settings) to see it. WordPress and many apps create one automatically.
What it can do
- Redirect URLs (301/302).
- Force https.
- Set custom error pages.
- Block or allow specific IP addresses.
- Control caching and protect files.
Important
A single typo in .htaccess can take your whole site down with a 500 error. Always back it up before editing, and if the site breaks, restore the previous version. Not comfortable editing it? We'll do it for you.
