RSS Feed appearing in Google (5 posts)

  1. stutley
    Posted 10 years ago #

    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:


    $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]);


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

    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.

  2. chaaban
    Posted 10 years ago #

    10x for this gr8 post

    i was searching for this long time ago

  3. john74
    Posted 10 years ago #

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

  4. 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.

  5. gpaulson
    Posted 9 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic