Finding and editing .htaccess

Files & Backups Updated Jan 15, 2026

Working with .htaccess

The .htaccess file controls server behaviour for your website.

Finding .htaccess

  1. Open File Manager
  2. Navigate to public_html
  3. Click Settings (top right)
  4. Tick Show Hidden Files (dotfiles)
  5. Click Save
  6. You should now see .htaccess

Editing .htaccess

  1. Right-click .htaccess
  2. Select Edit
  3. Make your changes
  4. Click Save Changes

Common .htaccess Uses

Redirect HTTP to HTTPS

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Redirect www to non-www

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Custom Error Pages

ErrorDocument 404 /404.html
ErrorDocument 500 /500.html

If Your Site Breaks

  1. Rename .htaccess to .htaccess_backup
  2. Test if site works
  3. If yes, review your changes
  4. Fix and rename back
Always backup: Copy .htaccess contents before editing. Syntax errors can break your site.

Was this article helpful?