404 Page Not Found Error Redirect to Home Page. How to Redirect 404 to Home Page htaccess file code on cPanel Just Copy and Paste this Code. If your page ranking on Google but your page URL 404 error so you will just follow my instruction.
How to Fix 404 Page Not Found Error
Login to your website or wordpress
- Go to Appearance then click Theme Editor
- Find 404 Page or 404 Template or 404.php file and then open that file
- Just Delete 404 all coding like below image
Now you have need to copy below code and go to your 404 file. and paste that code on your 404 blank page. see like below.
404 Page Not Found Redirect to Home Page Code Below
404 redirect to homepage htaccess code
Just Copy and Paste your 404 Page
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>
This is an example, It’s my not exit URL just you click and see results
Automatically Redirect to Home Page
https://www.shahimkhan.com/404examplenotexitpage
If you don’t understand click here for video solution
How to 301 Redirect and your not exiting page URL redirecting to your exist URL
How to do 301 Redirect You can Redirect your url to an other url without loss your SEO. 301 redirect edit in cpanel or blogger redirect to domain. 301 redirect htaccess and 301 redirect tutorial. Your page redirect to an other page. 301 Redirect plugin wordpress cPanel 301 Redirect how to codding and Code. Login your cPanel and go to your File Manager and then click public_html and open .htaccess file and paste this code after that edit your url. [ Redirect 301 /facebook https://facebook.com/Relifeon Redirect 301 /instagram https://instagram.com/Relifeon Redirect 301 /youtube https://youtube.com/Relifeon ]
Redirect your non www and http to www and https like https://www.example.com. code Below
<IfModule mod_rewrite.c
RewriteEngine On
RewriteRule ^site_map([0-9]).xml$ ?get_map=1&tml=1&ran=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
/IfModule>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.shahimkhan.com/$1 [R,L]
I already Explained on my YouTube Channel Below Video. I hope you will understand and you will very happy with your website.
Thanks for Visit this Site and You will visit again for more information.