Articles on: WordPress

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.


  1. Log into your backend 's File Manager



  1. Find the .htaccess file in your root domain's directory
( Please note that .htaccess file are sometimes hidden in the cPanel )



  1. Edit the following .htaccess file



  1. Add the following Rewrite Code on the first line in the .htaccess .
Please use the correct Rewrite Rules for WordPress


  • 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


  1. 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

Was this article helpful?

Share your feedback

Cancel

Thank you!