Need 301 htaccess code to redirect 404 page to home page
vikasbook said 1 year ago:
Hi,
Can anyone help me with the htaccess code to redirect 404 page to home page. I don’t want to go with meta refresh tag and looking for htaccess code to redirect 404 error page to home page
Nate D said 1 year ago:
@vikasbook – You can simply set your home page as the destination for 404 errors:
http://support.godaddy.com/help/1/setting-up-a-custom-404-page
http://support.godaddy.com/help/3352/setting-a-404-page-on-subdomains-and-aliased-domains
sherrod said 1 year ago:
@vikasbook,
Looks like @NateD has provided some great advice. If you are looking for any more information please let us know.
Sherrod
vikasbook said 1 year ago:
I am looking to redirect all 404 error pages to home page. I don’t want to customize 404 error page and the way should be 301 htaccess code
Nate D said 1 year ago:
@vikasbook – You do not want to do a blind ‘catch all’ 301 redirect. This would give your website an infinite number of pages, all containing the exact same content as your homepage. Just in case you did not know Google does not like that very much.
You want it to give the 404 code when appropriate, but like I pointed out you can set this to any page you want (even your homepage). Then use 301 redirects for specific URLs that do have a counterpart on your site (like oldpage.html redirects to newpage.html).
9 min expected wait time