PHP is a powerful server side language that offers greater ease of use than static HTML pages. However, PHP can be a difficult proposition when it comes to search engine optimization. PHP developers encounter many technical issues while creating PHP scripts based on SEO guidelines. Here are some issues that may affect optimization of PHP pages and guidelines on how to overcome them without technical hiccups. Latency of PHP scripts: The execution time of a PHP code counts a lot in determining the SEO friendliness of the script. If a search engine spider crawls one’s PHP page and follows a link, but is forced to wait long for the server to execute the PHP code behind the page, then, it may neglect the page or move on without crawling the remaining page.
To avoid slowdowns, reduce the number of SELECT calls one uses. Using SELECT on a table that contains 10 fields and to select only one is like inviting a slowdown of one’s script. Instead, name all the columns one wants to retrieve. Further, to make loops more search engine friendly, use duplicated code that will not be repeated many times and static values such as count values. Search Engine friendly URLs to optimize one’s PHP pages to look like static pages to search engines, one can use either of the two ways. One can use Apache to fake such static page like URLs or keep one’s GET variables to a minimum. URL cleanliness is a crucial issue in dynamic PHP pages. Since such pages are created with GET variables, the URLs look clumsy and almost unreadable to search spiders. Use less number of GET variables to avoid incomprehensible URLs.
Instead, one can also make GET variables relevant by using keyword rich titles and terms. If the page requires more variables, one can combine the variables by delimiting them with a hyphen or an unused character. Rewriting one’s URLs should be done after a lot of thinking since one cannot change one’s links over and over again. First decide on how one wants to rewrite the URLs, and then implement it in one’s .htaccess file.
Story by reepen
