Jump to content

Dynamic title tags and Google Index


Quentinb

Recommended Posts

Hi All.

 

I added dynamic title tags to my website at: http://www.farmstockforsale.co.za/

 

Specifically pages like these:

http://www.farmstockforsale.co.za/fulldetails-Huge_Plough_Groot_Ploeg_For_Sale_Te_Koop-23.html

http://www.farmstockforsale.co.za/fulldetails-Mix_Breed_of_Chickens_For_Sale-12.html

http://www.farmstockforsale.co.za/fulldetails-Old_Farm_Cheap_Tank_Tanker_Truck_For_Sale-31.html

 

You will see that the landing page(fulldetails) is the same for each, but the title for each is not.

 

Google finally started indexing these pages and now says that I have duplicate tags?

This is part of the code:

session_start();	
include("db/configure.php");	
include("db/database.php");	
include("db/constants.php");	
include("functions.php");		
$url = $_SERVER["REQUEST_URI"];	
$pos = strpos($url, "-");	
if($pos !== false)	
{		
   $title = substr($url, strpos($url, "-")+1);		
   $title = substr($title, 0, strpos($title, "-"));		
   $title = str_replace("_", " ", $title);	
}

 

My title tag:

<title><?php echo $title; ?></title>

 

At this stage still playing around and will clean my code later. Just need to know why Google is reading all pages with the same title?

Link to comment
https://forums.phpfreaks.com/topic/264732-dynamic-title-tags-and-google-index/
Share on other sites

I had it as a normal static page about 2 weeks ago when Google first indexed it. Then changed it to dynamic as it is now and monitored Google Webmaster Tools everyday until last night when I saw the new crawl finding the new dynamic page, but complaining about the duplicate title tags.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.