• Maybe I just don’t know how WordPress works, but after submitting my RSS-feed to various sites, the feed started appearing in Google. No problem except for the fact that it appeared instead of the URLs to my posts, so suddenly I didn’t get traffic on the actual site.

    As such, I made a little workaround since Google takes forever to crawl my site again. I coded a little snippet and placed it in the /feed subdirectory (which would usually redirect to the actual RSS-feed.

    I named the file index.php so whenever Google would refer a visitor to the blog.com/feed directory, this would happen:

    <?php

    $parts = explode(‘&’, substr($_SERVER[‘HTTP_REFERER’], strpos($_SERVER[‘HTTP_REFERER’], ‘q=’)));

    for($i = 0; $i < sizeof($parts); $i++) {
    if(strstr($parts[$i], ‘q=’)) {
    $key = $i;
    }
    }

    $query = str_replace(‘q=’, ”, $parts[$key]);

    ?>

    <html>
    <head>
    <title>Blog</title>
    <META HTTP-EQUIV=Refresh CONTENT=”0; URL=https://www.blog.com/index.php?s=<?php echo $query; ?>&sbutt=Search”>
    </head>
    <body bgcolor=#ececec>
    </body>
    </html>

    What it does is to find out what the visitor originally searched for on Google. The script reads the Google search query and simply searches the blog with the same query.

    It’s far from perfect, but it maintains the traffic to my site until I figure out another way.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 10x for this gr8 post

    i was searching for this long time ago

    Where to is the feed directory, I do not see one

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    An easier way is to sign up for Google Sitemaps and use a Google Sitemaps plugin to generate a sitemaps for Google to read. Then there’s no real messing about, Google knows exactly what to index on your site because your map tells it what to index.

    I tried puting this code in the /feed/ directory as suggested, but it killed my regular RSS feeds.

    Also, the Google Sitemap tells Google where to go but does not limit where Google goes. So just because a link is not listed in your sitemap.xml file does not mean that it will be ‘skipped’ by the search bot. That is why you need to have a good robots.txt file too.

    Here is my latest attempt at the robots.txt file to fix the feeds problem, etc:

    Robots.txt, RSS Feeds, etc

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘RSS Feed appearing in Google’ is closed to new replies.