Help with php/html page not showing in web search

(Thanks for all previous help)

The php web video script that I’m using displays user/member account pages in google searches.
The url displaying the page, for example, is like https://webvideosite.com/@chrisj
I’m looking for guidance/suggestions on how to have the user/member account pages not appear in searches, either by blocking that somehow,
and only having access to it if you are logged into the site.

I’ve added this (with some limited help from the developer):

  <?php
    if ($pt->second_page == ‘about’)
    echo "<meta name='robots' content='noindex'>'";
    ?>

but, I don’t know how to test it to see if it works or not.

Also, I’d like to have the user/member account pages only be accessible to another logged-in user/member.

I look forward to any replies/help.

I’m not sure this is really a PHP topic, despite PHP being the language that will be outputting whatever you need.

I agree. I’ve moved the topic to #marketing, as it is more about search engines.

@ChrisjChrisj: I suggest you read Google’s guidelines:

https://support.google.com/webmasters/answer/93710?hl=en

https://support.google.com/webmasters/answer/6062602?hl=en