How to remove indexed pages from google effectively

by slow diver   Last Updated March 01, 2019 10:04 AM

e

My site was getting traffic and it was on the rise, then I added https and somewhere in that time I also created tons of extra link for google to crawl, thinking this will increase traffic in those area where there was no traffic.

It backfired, my traffic reduced from 900/day hits to some 300 now. I have implemented 301 redirect for subdomains (subdomain somehow had duplicate pages so removed it) and then there was PHP script where I created these extra links, I don't know what properly unindex them now.

It has been 5 days since I made those changes, still the indexed pages are still in 55k which is huge. My site originally had 11k index pages, then rose to 100k and now at 55k. How can I remove those 'extra links' from index that I had created using PHP Script. Note I had asked google to index the whole page that I created and index all the links coming out of it.

PHP Code

This is the code where I created these links (forcefully). Basically my website is city base. I am pulling all cities, and then force them to use all the tags I have for all the cities.

<?php
$result1 = getDistinctBizCities();

if($result1 != false)
{
  while ($row1 = mysql_fetch_array($result1))
    echo '<h2>Businesses in '.$city.'</h2>';
    $result = getTags();
  {
    $city = ucfirst($row1['city']);

    if($result != -1)
    {
      echo'<ol>';
      while ($row = mysql_fetch_array($result))
      {

        echo '<li><a href="/search.php?keywords='.$row['tags'].'&city='.$row1['city'].'">'.$row['tags'].' in '.$row1['city'].'</a></li>';     
      }
      echo '</ol>';
    }   
  }
}
?>


Answers 1


I would fire the 410 Gone as a header - so Google quickly learns these pages are away and removes them fast from index.

Like

<?php
     if ($_SERVER['REQUEST_URI'] == '(url-pattern-to-remove-1|url-pattern-to-remove-2)') {
       header ("HTTP/1.1 410 Gone");
     }
?>
Evgeniy
Evgeniy
March 01, 2019 09:43 AM

Related Questions


Updated April 15, 2016 08:01 AM

Updated June 26, 2015 12:17 PM

Updated August 23, 2017 16:04 PM

Updated December 15, 2017 05:04 AM

Updated September 15, 2017 09:04 AM