Site icon Hip-Hop Website Design and Development

How do I redirect the browser to 404 web page, if no posts are present in residence web page

I’m itemizing posts on the homepage with pagination and if no posts are discovered on the house web page. I need to redirect the web page to 404 web page and get 404 response code.

For instance, instance.com/web page/200 Web page quantity is 200 however there isn’t a have 200 pages within the posts.
I utilizing two WP queries on the house web page, I need to try this for the primary question.

I need to redirect 404 web page and get 404 response as a substitute of "show no result text".

It is engaged on class web page however I could not do it for homepage.
Thanks