Forum Moderators: coopster

Message Too Old, No Replies

How will PHP headers effect my SEO

         

Kysmiley

12:42 am on Nov 22, 2004 (gmt 0)

10+ Year Member



Will using headers effect how search engines spider my site. Using the headers and footers would be so much easier as file includes rather than doing one for every page. But then how do i change the meta tags for different pages with the same header?
Pat

jatar_k

2:26 am on Nov 22, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



they won't cause any issues. Search engines won't know anyway as the php is processed on the server before the page is served to the client (spider or browser).

often you can put vars in the files before the include for the header, something like so

<?
$title = 'my great site title';
$description = 'my great description';
$keywords = 'my great keywords';
include '/path/to/header.php';
?>

then in the header

<?
if(!isset($title)) $title = 'my default site title';
if(!isset($description)) $description = 'my default description';
if(!isset($keywords)) $keywords = 'my default keywords';
?>

then echo the value of those vars in the appropriate place in the header.