Welcome to WebmasterWorld Guest from

Forum Moderators: mademetop

Message Too Old, No Replies

php header and footer configurations

php header and footer, search engine promotion

3:17 am on Jan 17, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Aug 7, 2003
votes: 0


Im thinking of using one header.php and one footer.php for my website to ease mamangement and create a consistant template throughout my website.

Anyone know if this is bad for search engine promotion?

11:16 am on Jan 17, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 8, 2004
votes: 0

I do this and variations all the time. It is standard practice. I presume you are worried about duplicate content penalties? I wouldn't worry so much, just make sure you are not loading the page down with too much unnecessaryness :O) Look at this site, webmasterworld, and how well it does in the serps. Standard template and no penalties ..
1:30 pm on Jan 17, 2005 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
votes: 6

There's no problem with this - but make sure that your
is different for each page, as well as the meta description and keywords if you use them. You can use a variable at the top of each page to echo the values you want in the right place, for example:

<?php $pagetitle="page title";
$keywords="list of meta keywords";
$description="your meta description here";

<p>your page content here...</p>

<?php include($_SERVER["DOCUMENT_ROOT"]."/includes/footer.inc.php");?>

And in your header.inc.php:

<?php header('Content-Type: text/html; charset=ISO-8859-1');
header('Content-Language: en');?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


<title>WidgetsCo<?php if (isset($pagetitle)) {echo " - ".$pagetitle;}?></title>

<?php if (isset($description)) {
echo "<meta name=\"description\" content=\"".$description"\">";}?>

<?php if (isset($keywords)) {
echo "<meta name=\"keywords\" content=\"".$keywords"\">";}?>

<style type="text/css" media="all">@import "styles.css";</style>

5:42 pm on Jan 17, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 8, 2004
votes: 0

Yup, I usually draw all the content out of a database and roll a simple cms to populate the data.