Is it better to have an ErrorDocument 404 redirect back to the homepage or a standard 404 error page?

Is it better to have an ErrorDocument 404 redirect back to the homepage or a standard 404 error page? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Is it better to have an ErrorDocument 404 redirect back to the homepage or a standard 404 error page? error on your web browser. Problem :


We run an ecommerce site that was setup by a third party ecommerce software provider, basic shop with product pages, basket and checkout.



The third party vendor set up the htaccess file so that if a non-existent URL is enetered it redirects to the homepage instead of a 404 error being generated.



This results in google webmaster reporting duplicate titles and descriptions for pages that no longer exist.



I think that it would be better for a dedicated 404 error page to be displayed rather than redirecting back to the homepage



So is it better to have a website redirect a 404 to the homepage than have a dedicated 404 page instead?


Solution :

Strong vote for a dedicated 404 page.




  • Less confusing for the user

  • Allows you to see more easily if something is wrong (through web server error log, your own logging script and/or Google Analytics)

  • You can tailor the page towards the situation (for example display a list of product categories)

  • Allows search engines to clean up their indexes. No longer existing pages in a search engine's index may prevent new pages from being added.



On the last point: Make sure to actually return a 404 error. From what you're saying it sounds like it's currently a 301/302 redirect. To do so include



ErrorDocument 404 /notfound.htm


in your htaccess file.



Also see



http://googlewebmastercentral.blogspot.com/2008/08/make-your-404-pages-more-useful.html



I'd vote for a separate error page if only to let the users of your site know that the link they clicked failed or they typed the wrong URL. It would be confusing to get back to the home page. I know I'd be tempted to repeat my actions to see if I'd done something wrong!



If you added a "report this broken link" link or even logged it yourself, you'd get notification and a chance to fix problems with the site.


We hope that this article has helped you resolve the redirects, htaccess, google-search-console error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=