Jekyll 404 Redirects

Looking to make Jekyll sites redirect 404 pages to the homepage (IE if a page is inaccessible, redirect to home).

I know all about _redirects etc – can you provide any insight on how to achieve the above?

Thanks

hi rich,

have you tried doing what you are hoping for with a netlify _redirects~ file? or did that not work for some reason? :thinking:

Yes, tried that and it did nothing.

A site name would help us check the issue :slight_smile:

I’d ideally like to have 404 pages redirect to the home.

You’ve setup an incorrect redirect :slight_smile:

You’re redirecting from /404.html to home page, but instead you need to change it to /* and remove the force parameter.

Testing now, thank you!

Thanks, I have tested it. Whilst it does show the homepage, the redirect is not respected in the address bar. I’d ideally like to have it redirect to the homepage. Is this possible?

You’d have to change 404 to 301.

Thank you. Any idea on how I’d communicate that it’s a 404 error to Google and the like?

That won’t be possible. If you wish to have a 404 status, the URL won’t change and vice-versa. However, I believe if you keep sending 301s for the same URL, over time Google will drop that URL from the index.

Thank you, much appreciated! You can consider this closed now.