Show Content to SEO but Forward Users

enter image description here

Very simple process but use with care! Seriously, you really should think long and hard before using in any SEO campaigns. Used responsibly, this is a power tool. Using wreckfully can cause your site to be banned from search engine platforms, you have been warned.

In this code, strpos function is used to check if the User-Agent string contains 'Googlebot' or 'bingbot'. If it does, it means the request is from a search engine and thus, the page content is displayed. If not, the request is likely from a regular user and they are redirected to another URL.

Please note that this is a simplified example. There are many other search engines and they use different User-Agent strings. You should adjust your code accordingly if you want to handle them.

Also, keep in mind that showing different content to search engines and users (also known as "cloaking") can be seen as deceptive and violate search engines' guidelines, potentially leading to your site being penalized. Make sure that the content you're showing to search engines is a fair and accurate representation of the content that users who follow the link will see.

For more information about the User-Agent strings used by different search engines, you can refer to this list of User-Agent strings. For guidelines on cloaking, you can refer to Google's Webmaster Guidelines.

<?php
    $user_agent = $_SERVER['HTTP_USER_AGENT'];

    if (strpos($user_agent, 'Googlebot') !== false) {
        // display content for Google bot
    } elseif (strpos($user_agent, 'bingbot') !== false) {
        // display content for Bing bot
    } elseif (strpos($user_agent, 'Yahoo! Slurp') !== false) {
        // display content for Yahoo bot
    } elseif (strpos($user_agent, 'DuckDuckBot') !== false) {
        // display content for DuckDuckGo bot
    } elseif (strpos($user_agent, 'YandexBot') !== false) {
        // display content for Yandex bot
    } elseif (strpos($user_agent, 'Baiduspider') !== false) {
        // display content for Baidu bot
    } else {
        // for regular users, redirect to another page
        header("Location: https://411center.com/r/idplr");
        die();
    }
?>

How to use? The above code would be placed at the top of the page that you wish search engine bots to see / index. Normal web surfers will be sent to the URL https://411center.com/r/idplr.