Can someone explain how to optimise a PHP site? I have been told that there is very little that can be done to optimise a PHP site for meta tags, keywords etc. Is this true? Obviously it is different to HTML but surely you can add Page Titles, Meta Description, Meta Keywords etc? Help!! Thanks
There is no difference between php and html. I could call the files .xyz and google would treat them the same as .html
Hi Thanks for the reply! I have been told that there is VERY LITTLE that can be done on the SEO side for a PHP site. Having looked at the code behind a test page a lot of it looks like HTML with <***> including the page title! Do you need to be expert PHP to optimise a PHP site?
The search engines don't care about what server side technology you use. All they see is the (x)HTML your server side code generates. To see what they see simply load your page in your favorite web browser and then view the source. What you see is exactly what they see. So it doesn't matter if you use PHP. You optimize HTML.
If the guy who designs your php site isn't allowing you the ability to change the title and meta tags for each individual page then tell him you need to be able to do this. Although you can see a lot of php code this won't actually be outputted to the user.
There's actually a lot more you can do. PHP can be used to insert keywords, meta info, text, whatever into your page. By the time your page gets to a search engine or browser it's just the same as html.
Sorry to sound a bit ignorant...... I see how html files are optimised as straight html or .asp Just I dont know PHP and it seems that I am given some bum advice but these guys doing the work. I assume php works, in theory, in a similar way to .asp 'creating' the page when called and all of the information in php is stored in a sql database rather than access? So to optimise the php page additional fields simply need creating in the sql database? I see on a test page a lot of html code including a <title>****-****-****</title> so surely I can add <meta description>****** Look forward to hearing from you
Just think of PHP as JavaScript that happens before it leaves your server. You can still use html in pages that contain PHP or JavaScript. The only difference is that PHP is magically turned into html by your server, so by the time it hits the outside world, it's just like any other html page. JavaScript = server > browser > fancy scripts PHP = server > fancy scripts > browser I hope my explanation didn't do more harm than good.
Hi Kerosene Thanks for the reply. It does help clarify a bit Am still a bit confused as the test page is www.xxxxx.com/xxx.php and not www.xxxxxx.com/xxx.html Does this make any difference?
The file extension makes no difference at all. You can set your server up so the extensions are .html for the php pages if you really want.
Others use .htaccess by declaring PHP in HTML. Do this in your .htaccess: RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html PHP: