How to redirect all 404 pages in to Home Page or Specific Pages


How to redirect all 404 pages in to Home Page or Specific Pages:

In internet 404 pages means, the source is moved or unavailable for that URL. Sometime 404 error pages are not good for sites, search engine reduces the rank on your site. Hence to avoid the search engine penalization we have to create 404 error pages or all the 404 error pages into home page. Also using below method you can redirect from 404 pages to a specific page with the same URL. Let see.
  • Log on to your cpanel in your webhosting.
  • Go to file manager => in that go to Public html folder. Here public .html folder only contains all of our sources such as scripts, media sources, datas etc.
  • Or if you have FTP access then you can directly login to your file manager using any of the FTP client software.
  • Now find .htacess file or sometimes dotted files will be hidden as default. i.e in godaddy webhosting dotted files will not have displayed as default. To view them you have to enable dotted files to display.
  • After finding .htacess file => open it and add below coding to your htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /index.html [L]
</IfModule>
In above coding all the 404 pages will be redirect to home page (index.html), In case, if you are going to change the home page means, you can change URL from index.html to any other specific pages.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /mypage/index.html [L]
</IfModule>
That’s all for custom html sites.
If you are using wordpress website, the you just install the plugin is called 404 error pages to home page redirect.
  • Login to your wordpress website
  • Go to plugin => add new plugin
  • Search “404 error page to home page” redirect plugin or download this plugin and upload & activate it.
  • In that, you have multiple error pages such as 301, 302 and 404 redirect home page or specific pages.

Comments

Popular posts from this blog

How to solve adsense site is down or unavailable?

How to Upload dot apk file on WordPress website

Top 5 Cheap .com domain provider in India – $2 Per .com Domain