how can I redirect users coming from a Google search, but not Google crawler for the same page?

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I wondered if there is a way to redirect users that come from a Google search to my homepage when the ranked page isn't the homepage, without interfering the good ranking for that page.

What I need is a php condition to understand if the webpage is reached from a user that comes from a Google search and not from the Google crawler. I need Google crawler to continue indexing that page, and at the same time, users to be redirected to the homepage. This is a pseudocode snipped of what I mean:

if ($_SERVER['HTTP_REFERER'] == 'only users from a Google search') 
    header('location','index.php');
profilepic.png
manpreet 2 years ago

Don't use any of these techniques, you should treat Google like any user, don't add any filters or conditions in your code.

We call this technique cloaking, its one of the most dangerous spam techniques and Google will penalize you.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.