500 Internal Server Error After Editing .htaccess: Find the Bad Line
A mistake in .htaccess makes the server return error 500 for the whole site. Rename the file, confirm that fixes it, then restore rules one block at a time.
If a 500 error started right after you edited .htaccess, the file almost certainly has a line the server cannot understand. You can get the site back in a minute and then find the line.
Step 1: Rename the file

In File Manager or FTP, rename .htaccess to .htaccess-old. Reload the site. If it comes back, the file was the cause.
Step 2: Turn on hidden files

If you cannot see .htaccess, enable Show Hidden Files in File Manager settings, or in FTP show hidden files.
Step 3: Read the error log

In your hosting panel open Errors or Logs. A line such as .htaccess: Invalid command or AH00526 names the exact directive and line number.
Step 4: Restore a clean file

For WordPress, go to Settings, Permalinks and click Save to rebuild a default .htaccess. For other sites, restore the last backup copy.
Step 5: Add your changes back one at a time

Paste back one block, save, reload. When the 500 returns, the last block you added is the culprit.
Step 6: Check common mistakes

Typos in directive names, a missing RewriteEngine On, unclosed <IfModule> tags, smart quotes copied from a web page, and directives your host does not allow.
Step 7: Check the file ends correctly

Make sure the file is plain text with no extra characters, and that it uses straight quotes.
Still stuck?
If these steps do not solve it, we fix it for you for a flat $99. Full refund if we do not solve it within 7 days.
Related guides
- Writing Clear Error Reports: Screenshots, URLs and Steps
- WordPress Tag and Date Archives Duplicate Content: Settings
- WordPress Permalinks Change: Redirect Old URLs and Avoid 404s
- Error Establishing a Database Connection in WordPress: Full Checklist