Custom 404 page integration with .htaccess and their SEO impact

 

If some visitor opens the url that doesn’t exist on the website then that url show 404 page.
The best way to handle customers request to show a customized 404 page on the website and then link 404 page with website through .htaccess file when someone opens a link that is not available to the website.

Calling 404 page (custom error page) with .htaccess file
We can associate 404 page (custom) error page through htaccess file by just writing a single line into our htaccess page

ErrorDocument 404 http://www.cutehits.com

The same code will be written to redirect users to home page of website through .htacces file

Make sure after adding the above errordoc in your .htaccess file you are getting proper redirect.
For 404 pages you must get eithger response header 404 or 301 (if you want to redirect user to home page of website). Click on Website Redirect Checker to check your website redirect.
Like below

website header redirect

If you see HTTP/1.1 302 then you must need to change it so that it should show either HTTP/1.1 301 or HTTP/1.1 404 .

Chaget 302 redirect with 301 redirect using htaccess file

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . http://www.cutehits.com [L,R=301]

Related posts:

The following two tabs change content below.

Chandra Shekhar

Consultant at Infogain
Chandra Shekhar is a LAMP Developer,Thinker,Blogger and currently working as Magento(Ecommerce) specialist.. I am always open to learn new things in LAMP as well as other newer technology. In the journey of my last 9 years of web and product development, I have decided to share my knowledge and experience to Open Source Community in 2011. In this regard I have started CuteHits.com. Since then I am actively sharing my knowledge on various LAMP technology through CuteHits.com’s technical ... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)