General

Enable AllowOverride

Updated November 2026 11,378 views 3 min read
General | Updated November 2026

If your .htaccess rules are being ignored (redirects not working, custom error pages not loading, rewrite rules having no effect), you may have found advice online to "enable AllowOverride." On Ultra Web Hosting shared hosting, AllowOverride is already enabled. The problem is something else.

01. Why Your .htaccess Rules Might Not Work

If AllowOverride is already enabled but your rules still have no effect, check these common issues:

  • Nginx reverse proxy - Our servers use an nginx reverse proxy in front of Apache. Some .htaccess rules that depend on Apache seeing the original request may need adjustment. See Nginx and .htaccess Redirect Issues.
  • Syntax error in .htaccess - A single typo can cause the entire .htaccess file to be ignored (or produce a 500 error). Check cPanel > Metrics > Errors for Apache error messages.
  • Wrong directory - Make sure the .htaccess file is in the correct directory. Rules in public_html/.htaccess apply to your main domain. Addon domains need their .htaccess in their own document root.
  • Missing RewriteEngine On - Every set of rewrite rules needs RewriteEngine On at the top. Without it, RewriteRule directives are silently ignored.
  • File is named wrong - The file must be exactly .htaccess (with the leading dot, no file extension). On Windows, you may need to save it as .htaccess. (with a trailing dot) to prevent Windows from stripping the name. See htaccess File Disappears.
  • Cached redirects - Browsers cache 301 redirects aggressively. Test in incognito/private mode or clear your browser cache.

02. VPS and Dedicated Servers

If you are on a VPS or dedicated server and manage your own Apache configuration, AllowOverride may need to be set manually. Edit the Apache configuration (usually /etc/apache2/httpd.conf or the relevant virtual host file) and ensure:

<Directory /home/*/public_html>
    AllowOverride All
</Directory>

Then restart Apache: systemctl restart httpd

On shared hosting, you do not have access to Apache's main configuration, but it is already set correctly for you.

For a comprehensive guide on what you can do in .htaccess, see Complete Guide to .htaccess on Apache.

.htaccess Rules Not Working?

If you have verified the syntax and file location and your rules still are not taking effect, open a ticket with the rules you are trying to use.

Open a Support Ticket

Frequently Asked Questions

Do I need to enable AllowOverride on UWH shared hosting?

No. AllowOverride is already enabled on our shared hosting, so .htaccess files work out of the box. If your .htaccess rules are not taking effect, the cause is something else, not AllowOverride.

Why are my .htaccess rules being ignored?

Common reasons are a syntax error in the file (which can cause a 500 or silently drop rules), the file being in the wrong directory, a rule for an Apache module that is not loaded, or the nginx reverse proxy serving a cached or static response before Apache applies .htaccess. Check the error log and the file location.

How do I enable AllowOverride on a VPS or dedicated server?

With root access, set AllowOverride All within the relevant Directory block in the Apache config, then reload Apache. On shared hosting this is already done for you, so it only applies where you manage Apache yourself.

How do I tell if my .htaccess has an error?

A bad directive usually triggers a 500 Internal Server Error. Rename the file to test; if the site returns, the file has a bad line. Check your site error_log in cPanel for the specific directive, then correct or remove it.

Quick Recap

  1. AllowOverride All is already enabled on shared hosting - No action needed
  2. If rules are not working - Check for syntax errors, wrong directory, or missing RewriteEngine On
  3. Nginx reverse proxy can affect some .htaccess rules - See our nginx + htaccess guide
  4. Test in incognito mode - Browsers cache 301 redirects
  5. VPS users - May need to set AllowOverride in Apache config manually

Understanding .htaccess on shared hosting · Last updated November 2026 · Browse all General articles

Share: X in Reddit f Email
  • 773 Users Found This Useful

Was this answer helpful?

Related Articles

What are these vt directories?

General | Updated November 2026 If you see directories named .cagefs, virtfs, or paths...

osCommerce password reset

General | Updated November 2026 If you have lost your osCommerce admin password and cannot...

Firewall Block: How to Unblock Your IP

Errors & Troubleshooting | Updated November 2026 If you suddenly can't access your...

How can I change the default page / document?

General | Updated November 2026 The default page (also called the directory index) is the...

Why Do I Get Emails for Cron Jobs

Hosting Control Panel | Updated March 2026 Every time a cron job runs on your Ultra Web...



Save 30% on web hosting - Use coupon code Hosting30