XF 1.4 How to redirect 404 to homepage?

ibrian

Well-known member
I appreciate the technical need for 404 error page, but they are absolutely terrible for users and having made a site move, and finding it to be very frustrating to still have so many 404's come up.

How would I be able to redirect visitors from the default XF 404 page to the XF homepage, please?
 
Why do you have so many 404's after a site move?
Haven't you implemented redirects from the old to the new URLs?

Indeed, I ran kier's redirect script, but needed to drop that to redirect the old domain properly - it's been 5 months since I did the move.

However, Google is still full of the old domain vb3 URLs.

So I would rather have a 404 page that now redirects to the homepage, than have continued errors that are no good for users.
 
I think If you care about SEO, then you may find that Google is happier with a 404 as opposed to a redirect to homepage.

But something like this in htaccess should work

ErrorDocument 404 /index.php

Though you may need an absolute path.

I would also advise against it for the reason that you won't find the errors that are causing the 4o4s.
 
I find the best thing is to have a custom 404 page with some text explaining that the page you are looking for has gone or moved, and to include a useful site at so the person can either go to the home page or maybe find what they are looking for.
 
Back
Top Bottom