0

Over ten years ago, I put all my webpages in databases, why I don't remember. One reason could have been so that readers could look up specific terms. My site teaches English. The content of the database entries is very different but the pages that use the databases are very similar, most of them are like this one:

<?php 
$page_title="...";
include('header001.html');
?>
<h1>...</h1>
<h2>...</h2>
<br>
<?php
$dbhost="...";
$dbname="...";
$dbuser="...";
$dbpass="...";

// Create connection
$conn = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * FROM ... WHERE ...='25'OR ...='26'";

$result = $conn->query($sql);

$i=0;
if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
echo '<i>'.$row['text'].'</i>';
echo $row['exemple'].'<br>';
    }
} else {
    echo "0 results";
}
    $conn->close();
    
    include("footer1.html")
   ?>

In webmaster tools, google says that I have many duplicate pages, could the fact that they all have very similar php content be the reason why?

  • Maybe all of them have the same `` (didn't find that tag in your code) and same keywords. – The Impaler Jun 29 '22 at 17:42
  • No, the titles are different. I notice that the above page doesn't have keywords, usually though, they do. $page_title is the parameter with the title and then the title is added in the header. Can google read my database tables when it indexes pages? – Superfluous Jun 29 '22 at 17:46
  • I have a very serious problem. I have over 400 pages, I wrote their titles down and numbered them so I can update them (I am changing from mysql to mysqli), and webmaster tools says I have 132 duplicate files which are excluded from indexing, 30 files which are excluded, I don't know why and 2 invalid links. It says I have only 8 valid pages. My site was doing great ten years ago but I neglected it for many years. I checked what The impaler said; there are pages with both a title and keywords that still are excluded. Any suggestions are greatly appreciated. – Superfluous Jun 30 '22 at 05:15
  • Google doesn't see your PHP code – Your Common Sense Jun 30 '22 at 05:54
  • As of the dupe pages, Google should provide you with examples. – Your Common Sense Jun 30 '22 at 05:54
  • Yes, I can see the duplicate pages but I don't know what they are the duplicate of. So, if google doesn't see my php code, does it even matter if I update my PHP version? – Superfluous Jun 30 '22 at 10:23

0 Answers0