How to Enable URL Rewriting for WordPress
If your WordPress path such as https://www.yourbusiness.com/about-us
are getting 404 error as shown in the picture below ,
You can add a ReWrite Rule in your .htaccess to resolve this issues.
- Log into your backend 's File Manager
- For cPanel , you can follow this guide. Working with File Manager (cPanel)
- Find the .htaccess file in your root domain's directory
- Edit the following .htaccess file
- Add the following Rewrite Code on the first line in the .htaccess .
- For single site WordPress , please use the code below .
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
- For Multisite WordPress , please use the code below.
# BEGIN WordPress Multisite
# Using subfolder network type: https://wordpress.org/documentation/article/htaccess/#multisite
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
# END WordPress Multisite
- Saves the changes.
You can check again your WordPress site to see if the 404 error are resolve and the https://www.yourbusiness.com/about-us
can be opened normally now.
Updated on: 27/08/2025
Thank you!