Jump to content

help with not showing php/html page in web search


Recommended Posts

The php web video script that I'm using displays user/member account pages in google searches.

For example, the url displaying the page is the 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,

or only having access to it if you are logged into the site.

I look forward to any replies

Link to comment
Share on other sites

Is this page under your control, ie, did you write it or are you hosting it on your own account?  If so you can modify how it works.  Perhaps to use a POST method instead of a GET method and add a form to it to get the search argument.

Link to comment
Share on other sites

Are you just trying to hack us while we are responding to your fake query for help?  I just tried that example url of yours.  It's written in Chinese!  Normally I refuse to click on these kinds of things.  For some ungodly reason I went against my better sense and exposed myself to your game.

What a jerk!

Edited by ginerjm
Link to comment
Share on other sites

Screen shots of what is happening maybe Chris?

Back in the day you could ask Google and other search engines not to spider a site or certain parts of it.  I don't know if that still works.  Search for help on how to use robots.txt

Link to comment
Share on other sites

Thanks for the replies.

Yes, noindex.

I had asked the web script author about this he replied:

"You can place it in ./themes/layout/container.html 
you will need to use php code in order to load this meta only for profile page".


I see the container.html <head> section and I believe the profile page is located at: /themes/default/layout/timeline/pages/about.html

I just don't know how to put it altogether with this:

     <meta name=”robots” content=”noindex”>


and additional guidance is appreciated




Link to comment
Share on other sites

What you are showing us is an attempt load a line of html code as php code.   What was suggested was that you use php to determine when to add the html line.  Something like:

(in php mode) 

if $pagename == 'profilerpagename.php' 

      echo "<meta name="tobots" content="noindex">";

These lines need to be added near where your head section is being out and of course only in the profiler page's coding.

Edited by ginerjm
fix the if
Link to comment
Share on other sites

Thanks for your reply.

The developer provided this:

$pt->second_page == ‘about’

based on the rest of the container.html code, I have added this:

    <?php if ($pt->second_page == about’){ ?>
    <meta name="robots" content="noindex">} />
    <?php } ?>

does this code look valid?

If so, how would I test?

Link to comment
Share on other sites

Thanks again for your reply/help.


does this line have an extra ' in it, before the last "   ?

echo "<meta name='robots' content='noindex'>'";

if not, and this is valid code:

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

how can I test to see if it successfully facilitates the user/member account pages not appearing in searches?

I look forward to any assistance.

Edited by Chrisj
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.