How Can I Redirect Users Coming From A Google Search, But Not Google Crawler For The Same Page?
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');
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.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?