How to fix 404 Error of wordpress website Content

404 page not found massage

What is 404 Error?

When you try to access a link on the web or visit a site, you’re actually telling a server that’s located somewhere to send you a page. For example, when you go to Alibaba.com, you’re telling the Alibaba server that you want to see their home page. 

This is called a request and this types of request primarily sent by the browser what you use to open the website. The server then responds the browsers request by sending you back a page. And this system of communication is known as HTTP. If, the server unable to responds the browsers request then you will see 404 http error. You also can see..

  • 404 Not Found Error
  • 404 HTTP 404
  • 404 Page Not Found
  • Error 404 Not Found
  • HTTP 404 Not Found
  • The requested URL was not found on this server
  • 404 File or Directory Not Found 

These are all Same. Don’t worry about the different Error Massage. So follow till the end of this post  and fix 404 error.

Follow Tips & Tricks Category to get more significant post like this.

 

When 404 error occurs?

There are several reasons why you’re getting an HTTP 404 code_

  1. When website owner change the web server Address.
  2. One typical trigger for an error 404 message is when the page has been deleted from the website.
  3. The page was moved to another URL and the redirection was done incorrectly.
  4. You entered an incorrect URL address.
  5. Although it happens very rarely, sometimes the server malfunctions.
  6. The entered domain name doesn’t exist anymore. 

How to Fix 404 Error ?

There are several option for fixing 404 Server issue. Here we are discussing about the 1st option above. If you are website owner and you have recently change the web hosting server or nameserver of the hosting, then you can probably see this 404 error. This is not a different issue. You can fix it in two simple methods.

First one

Login to your wordpress admin panel. Then Go to settings > Go to Permalinks  > Then Click on the below Save change button. That’s it. Now check the url or website Again. If it work’s then fine. If not work then follow then next methods.

Second One

Open the Cpanel of your website. Then click on File Manager . Open the domain of the website. Now click on Public_html Folder. Check .htaccess file is available or not. If available then edit the folder and replace the code given below.  If not available then click on the +File left top corner of the page. Write .htaccess as a file name and click on Create on new file. Now edit the file > paste the code > click on save change. Congrats you have already done. Now check your website url again. I hope it’s running quite well.

For Single site

# BEGIN WordPress

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Multisite

If you activated Multisite on WordPress 3.5 or later, use one of these.

Subfolder Example:

# BEGIN WordPress Multisite
# Using subfolder network type: https://wordpress.org/support/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

Subdomain  Example:

# BEGIN WordPress Multisite
# Using subdomain network type: https://wordpress.org/support/article/htaccess/#multisite

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

# END WordPress Multisite

You Can use Redirections WordPress Plugin to redirect changed or deleted page url. This plugin are simple and easy to use. You can check it.

Instant Grammar Checker - Correct all grammar errors and enhance your writing.
Share on facebook Share on twitter Share on linkedin Share on pinterest Share on whatsapp Share on email

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top