How we redirect 404 page in homepage?

Hello Friends,

I need your help for 404 page redirect to another page.

Thanks.

Use the <Switch> component and check if there is an error.

<Switch>
   <!-- PageError is the component you show with the 404 message -->
   <PageError when={data.isError} />
</Switch>

see: frontity - API Reference

Hi @Johan

Thanks for reply me.

I have already used this but i need any 404 page redirect to homepage url.

Thanks.

From a SEO standpoint redirecting a 404 to the homepage is terrible, so it’s better to show an error message and have a link to the homepage instead.

But if you really have to; check out Redirections with Frontity - Frontity Docs, which lets WordPress decide what to do when it can’t find a page.

Thanks for reply me i have resolved from this ref. Redirections with Frontity - Frontity Docs ,

2 Likes