How to do SEO (Search Engine Optimization) on php pages?

Posted on 26 October 2010 by SEOman from Seattle

I have an existing website with a combination of html and php pages. I want to optimize some of these pages for search engines. Will the same techniques (keywords, descriptions, etc) that work on html pages work on php pages?

Originally posted 2010-09-02 17:17:39. Go Home page

Possibly Related Posts and Articles (automatically generated)

5 Comments For This Post

  1. Benjamin Says:

    Most modern search engines like Google completely ignore the keywords and descriptions you put in the header tags.

    Engines like Google only focus on the page content, and they completely ignore any text that isn’t visible to the end user when the page is displayed to them. You get extra points if your page uses proper formatting with appropriate use of headers, bold words, standard text, images etc. The actual algorithm Google uses to determine Page Rank however is kept secret.

    The most important tool for getting a first page listing on a search engine is getting as many quality / high PR ranking websites as you can to link to your page.

  2. Namibnat Says:

    I agree with Benjamin, keywords don’t really matter that much. Essentially the most important thing is to produce good content and to publicize it. If people think it is good, and link to it, your search engine ratings will go up.

    In terms of your question, basically you can consider PHP and HTML as being the same thing. PHP is a server-side scripting language, which means that your code does it’s thing on the server, and sends a pure (well, except css, javascript and stuff like that) to your client’s browser. To the browser it doesn’t matter is if you used PHP or HTML, it just does it’s thing the same way. As far as the google-bot is concerned, it is also just an HTML page…i.e. they are concerned with what you are sending out, not how you make the page in the first page.

  3. R. M Says:

    Agreed. Do the same for HTML or PHP pages. Just make sure of the following:

    1. if your pages are dynamically pulled together with PHP, set them up so that they each get a distinct, keyword-optimized title

    2. set up each with a distinct meta description — it won’t do much for SEO, but will help your click-through rate because the human users (as opposed to Google) will have a better user experience when you appear on a search engine results page

    3. make sure your page load time is still fast

  4. Canonical Says:

    You optimize .php pages the exact same way you optimize .html pages. The search engines NEVER see your PHP code… they see the resulting HTML that gets rendered server-side by the PHP. It’s the HTML that is returned when the crawler requests the page that gets indexed and used for ranking.

    As far was “what” to optimize, there is basically two types of optimization… on-page and off-page optimization. On-page optimization means using elements ON the page to help your page rank. Off-page optimization is using elements OFF the page (on other pages of your site as well as on pages on other sites) to help your page rank.

    Overall, it is off-page factors that carry the most weight… i.e. inbound links from other pages using your targeted keyword phrase or slight variations as the link text… preferably from pages that are relevant to the topic you’re trying to rank for and pages with high PR or link popularity. It’s estimated that off-page factors might influence 70-80% of your overall ranking while on-page factors might influence 20-30% of your overall ranking.

    Here’s a quick rundown of on-page factors:

    Optimizing the title element is very important since it’s generally the most important on-page ranking factor for most search engines ranking algorithms. The title should target a single keyword phrase (possibly 2-3 IF they are VERY similar… almost identical in meaning and keywords). Minimize “fluff” words in the title element as they reduce the keyword density within that HTML element and thus make the real keyword phrase(s) you want to rank for seem less important. Put the most important keyword phrase first in the title element if you have multiple keyword phrases in the title. Avoid putting your site name in the title as it only hurts your page’s ability to rank.

    The h1 element is generally the 2nd most important on-page ranking factor. It should reinforce the keyword phrase(s) targeted in the title. Since it’s less important from a ranking perspective, it’s ok to add a few fluff words to give it more pazzazz or marketing flair. But again keyword density withing the h1 element does affect rankings slightly. Every page should have a single h1.

    The h2 element is generally the 3rd most important on-page ranking factor. If your content lends itself to have sub-headers, then use them… again targeting keywords from the title element.

    Words that are emphasized using bold or strong/italics or em are given a little more weight than words that are not. But I avoid this as it tends to make pages look spammy.

    Using keywords that your title is targeting in the page name is also useful. It’s a very minor ranking factor but MOST ranking factors are minor. It’s rarely any single thing that you do that makes a page rank well. It’s the sum of lots of small things that you do that when taken as a whole leads to good rankings.

    Optimizing the meta keywords element is virtually worthless. Google and most search engines ignore it in their ranking algorithm because it has been sooooooooooo abused by blackhats and spammers over the last decade. Yahoo! is still using it to rank pages as Danny Sullivan (a renowned SEO) proved just days after a Yahoo! exec announced at SMX that Yahoo! did NOT use it. I include a meta keywords element in all of my pages just for completeness (not for rankings). I use 5-10 keyword phrases and ONLY words/phrases that appear on the page.

    The meta description is also ignored by Google and most search engines for the same reason… it is not displayed on the page so it has been abused by spammers and blackhat SEOs. BUT optimizing the meta description element is VERY important since having a good meta description with a call to action can greatly improve click-thru-rate when your page appears in the SERPs and the meta description is shown as the snippet of text for your organic listing. At Google they only show your meta description if all keywords in the user’s search phrase appear in the meta description. So I recommend including all keywords from your title in the meta description since the keyword phrases in the title “should” be the pages most often used to find your page if it is well optimized. This will maximize how often it is shown as the Google snippet.

    As far as off-page factors (which are the absolute MOST important ranking factors at almost all engines):

    The link text used in hyperlinks pointing to your page give the search engines STRONG clues as to what your page is about. Using “Click here” as link text for a hyperlink is worthless… it only helps you rank for the keyword phrase “click here”. Be very cognizant of how you link to your pages both on your site on from other sites where you might drop a link.

    Inbound links from relevant and/or high PR pages on external sites with your targeted keyword phrase (from your page’s title) or slight variations are the MOST important thing you can do to help your page rank for its

  5. Kloud Says:

    Well, SEO is the Search Engine Optimization as it means, Visit us at our Affordable Social Media Services provider for Small and Medium Businesses WorldWide. Engage with Customers Where they Are, with Content they Value. Please Visit us at http://www.kloudsocial.com
    We will be glad to serve you and teach you better about SEO

Leave a Reply