Redirect the member to another page is not LoggedIn

My site has a page that still findable by the Google, Bing, Yahoo search engine (do not know why but) and would like to if a user try to get to this page that the code checks if the user is LoggedIn then we let him continue on the site and if not we redirect him to the page (Inscription) where my menu is hidden if not LoggedIn.

How can I do this on that page?

Pierre
ibmretraitesqc

Hide from search engine.
https://support.wix.com/en/article/hiding-a-page-from-search-engines-google

Make the page as members only already.
https://support.wix.com/en/article/creating-members-only-pages-596999

in code use Wix Users api to check if current user is logged in and if not use wixLocation to move them onto the appropriate page.
https://www.wix.com/corvid/reference/wix-users.User.html
https://www.wix.com/corvid/reference/wix-location.html

You can find an example of similar code to that on this tutorial page, just adept it to suit your own needs.
https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area#code

Thank you for the advice. Will look into this!