Link to home
Start Free TrialLog in
Avatar of Bobby Brown
Bobby BrownFlag for Canada

asked on

Help with SEO Friendly Site Creation

Hello experts,
I am creating a directory. I have header, menu, footer, content
I am thinking of making them in HTML - for SEO friendly - My main goal is SEO friendly site.
all the contents on the pages are static - nothing dynamic.

I would like to do this in PHP - so, I can put the header, footer, menu in include files in a .php file - so, all the header, footer, menu kept separately and I only make change one place.

I do not know why but I am thinking that  but .php extensions won't be SEO friendly... but my url won't be www.site.com/id=?... It would be www.site.com/program/myprog.php

If I decided to do this html - then, I have to use frames to header, menu, footer - and this is NOT good for seos.

So, my question is:

1) If I create a php pages - are these SEO friendly?
Because, I think that if it is all in html page - menu, header, footer - seo knows all the items in that page - but if it is php file - then will the seo know what is in my page? I am kind of lost with this idea. again, all the content will be static.
2) If I do this in html - how do I put the header, menu, footer separely...
Avatar of cdaugustin
cdaugustin

Hi,

I believe this page has the answers for your question

http://roshanbh.com.np/2008/02/hide-php-url-rewriting-htaccess.html
1. Yes, PHP include files WILL be SEO-friendly. They are outputting pure HTML to the webbrowser/visitor/search engine robots!

2. You won´t need it ;)
if you find something that you dont understand leave a comment and il reply :)
And if your site will be all static, you wont need those php ?id= URL's.
I was referring to the first part of the article :D but still GodDoesntExist is mostly right too, i guess its your call if to rewrite .php to .html (nobody knows FOR SURE what the search engines do in the back anyways)
And if you need php url's cdaugustin's link above will help you with that ;)
Avatar of Bobby Brown

ASKER

GodDoesntExist,

If I have a good site navigation, with all the pages urls - then the seos will spiders them.. right? I am not quite sure about re-writing urls - since I think I can achieve seo friendly site thru .php...

right?
So, if I have a index.php
and I have a top - header.php, left - menu.php, right - the content for the index.php and bottom - footer.php

I can simply do include for all these?

Can you show me an example on how to do this?

And, will SEO know what is in the menu.php or footer.php if they are "include".... I am kind of lost in that sense... I usually think that .html page - is visible to seo right away - but .php - include file - won't be visible...
Because, if I am going to put all the navigation in menu.php and if the SEO does not seen it, then, I am loosing it.. right?

Thanks cdaugustin for your re-writing suggestion.. but I think I have a wrong opinion about .php extensions and seo.. if you guys answer last 2 of my points...that would be great...
1) If I create a php pages - are these SEO friendly?
Because, I think that if it is all in html page - menu, header, footer - seo knows all the items in that page - but if it is php file - then will the seo know what is in my page? I am kind of lost with this idea. again, all the content will be static.

Yes. SE's read PHP pages and treat them just like HTML. If you view the page in the browser and view the source, you will see what the SE sees.

2) If I do this in html - how do I put the header, menu, footer separely...
I have often done a switch statement for the title tag because I want the title to be different for each page in order to provide the SE with the most accurate data.
ASKER CERTIFIED SOLUTION
Avatar of cdaugustin
cdaugustin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks kallesti.

Okay,  I am getting closer to understand...

Let's say, I have:
header.php and index.php. Code is below. So, when the search engine found my page (index.php) and place it's database, will the database contain what is in the my header.php file? like those list of menu items? You said it would contain - same as the source file of index.php - then my header.php would be visible.. right?

The reason that I am asking that - because - if I have all the keywords (navigation) in the header.php and if it is not in the seo database, I am screwed.. right?
======================================================================
Contents Of header.php
<?php
      <a href="#">Marc Andre</a>
      <a href="#">Leduc</a>
      <a href="#">Carl-Andre</a>
?>
now, my index.php
<html>
<title>A Basic PHP Website Using Include</title>
<body>

<p style="text-align: center;padding: 10px;">
include("header.php"); ?>
</p>

<p style="text-align: center;border: 1px dotted blue;">
Welcome to our website! The links above are being used in includes- saving us time that can be best used for developing better features for this website.
</p>

</body>
</html>
======================================================================
Hi,

to answer your last comment, yes your index.php will have all the contents from header.php  and its perfectly safe to include it that way.

on regards of the header.php file if you dont have any php code omit the  <?php  ?>.

To clarify within <?php ?> tags you need to place valid php code.

In your case the contents Of header.php should be:

      <a href="#">Marc Andre</a>
      <a href="#">Leduc</a>
      <a href="#">Carl-Andre</a>
It can be stored in the database or an include file. I always used a database. For example;

set your variable to the text that you would like to be in the title tag. $mytitle = (database value)

then output it on every page. <title><?PHP $mytitle ?></title>

You can store the whole header, I just always found this cumbersome as my description and keywords usually stay the same.
Thanks both...cdaugustin & kallesti.
Just a question for kallesti. Would you please give an example of what you are saying.. what kind of table (fields) and how would you use it.. it is sound very interesting idea...please give me a example.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you both for your answers.