> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.serverfreak.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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 , 

![](https://storage.crisp.chat/users/helpdesk/website/-/3/0/c/4/30c43b4318b81000/image_n22q3u.png)




**You can add a ReWrite Rule in your .htaccess to resolve this issues.&#32;**

1. Log into your backend 's File Manager

* For cPanel , you can follow this guide.  [Working with File Manager (cPanel)](https://help.serverfreak.com/en/article/working-with-file-manager-cpanel-1x37mjx/)
* For Direct Admin , you can follow this guide. [Working with File Manager (DirectAdmin)](https://help.serverfreak.com/en/article/working-with-file-manager-directadmin-wd6sg9/)

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

![](https://storage.crisp.chat/users/helpdesk/website/-/3/0/c/4/30c43b4318b81000/image_wa1d2y.png)

3. Edit the following .htaccess file

![](https://storage.crisp.chat/users/helpdesk/website/-/3/0/c/4/30c43b4318b81000/image_136j9l1.png)

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

![](https://storage.crisp.chat/users/helpdesk/website/-/3/0/c/4/30c43b4318b81000/image_1xxynbq.png)
* 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
```

5. Saves the changes. 

![](https://storage.crisp.chat/users/helpdesk/website/-/3/0/c/4/30c43b4318b81000/image_v3mxcj.png)



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.