Chrisj Posted June 28, 2019 Share Posted June 28, 2019 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 Quote Link to comment Share on other sites More sharing options...
ginerjm Posted June 28, 2019 Share Posted June 28, 2019 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. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted June 28, 2019 Share Posted June 28, 2019 (edited) 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 June 28, 2019 by ginerjm Quote Link to comment Share on other sites More sharing options...
Chrisj Posted June 28, 2019 Author Share Posted June 28, 2019 thanks for your replies. Regarding the url, I said "For example..." it was there as an example Quote Link to comment Share on other sites More sharing options...
ginerjm Posted June 29, 2019 Share Posted June 29, 2019 as an example of what exactly? You weren't trying to show us your own work? How silly to post it then! We DO know what a GET query looks like. Quote Link to comment Share on other sites More sharing options...
MPM Posted July 1, 2019 Share Posted July 1, 2019 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 Quote Link to comment Share on other sites More sharing options...
chhorn Posted July 1, 2019 Share Posted July 1, 2019 just use the "noindex" meta tag Quote Link to comment Share on other sites More sharing options...
Chrisj Posted July 1, 2019 Author Share Posted July 1, 2019 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: <?php <meta name=”robots” content=”noindex”> ?> and additional guidance is appreciated Quote Link to comment Share on other sites More sharing options...
ginerjm Posted July 1, 2019 Share Posted July 1, 2019 (edited) 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 July 1, 2019 by ginerjm fix the if Quote Link to comment Share on other sites More sharing options...
Chrisj Posted July 1, 2019 Author Share Posted July 1, 2019 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? Quote Link to comment Share on other sites More sharing options...
ginerjm Posted July 2, 2019 Share Posted July 2, 2019 How about: <?php if ($pt->second_page == ‘about’) echo "<meta name='robots' content='noindex'>'"; Assuming that you place this code in the correct script and in the correct place. Quote Link to comment Share on other sites More sharing options...
Chrisj Posted July 3, 2019 Author Share Posted July 3, 2019 (edited) 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: <?php 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 July 3, 2019 by Chrisj Quote Link to comment Share on other sites More sharing options...
Barand Posted July 4, 2019 Share Posted July 4, 2019 8 hours ago, Chrisj said: does this line have an extra ' in it, before the last " ? echo "<meta name='robots' content='noindex'>'"; ^ Yes, it does. I can see it quite clearly (indicated by ^ ). But it shouldn't have. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted July 4, 2019 Share Posted July 4, 2019 Oops - my bad. Sorry for the confusion. Quote Link to comment Share on other sites More sharing options...
Chrisj Posted July 5, 2019 Author Share Posted July 5, 2019 Thanks for all the replies/help. how can I test to see if it successfully facilitates the user/member account pages not appearing in searches? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.