PHP is a powerful server side language that offers greater scalability, dynamism and ease of use than static HTML pages. But, PHP can be a hard nut to crack when it comes to search engine optimization. PHP developers encounter a lot of technical issues while making PHP scripts based on SEO guidelines.
Here are some issues that may affect optimization of PHP pages. Also given are 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 your PHP page and follows a link, but is forced to wait long for the server to do the PHP code behind the page, then, it may neglect your page or go on without crawling the rest the page. To optimize the loop code and avoid slowdowns, reduce the number of SELECT * calls you use. Using SELECT on a table that contains 10 fields when you want to select only one is like inviting a slowdown of your script. Instead, name all the columns you want to retrieve. If you are using MySQL, test your queries using EXPLAIN statement. Further, to make loops more search engine friendly, use duplicated code that will not be repeated many times and static principles such as count principles.
Session ID issue: If the “enable-trans-sid” option is turned on, it makes links with session ID numbers. Not only do your links grow nonsensically-lengthy, but they also present spiders with different URLs to the same content, which in turn may produce problems in the indexing of pages. To avoid session ID in your URLs, you need to disable the ‘trans-id’ feature in php.ini by setting “session.use_trans_sid” to fake. Else, you can disable session ID feature by count php_flag session.use_trans_sid off to the .htaccess file in the root directory.
Search Engine friendly URLs: To optimize your PHP pages to look like static pages to search engines, you can use either of the two ways – you can use Apache to fake such static page-like URLs or keep your GET variables to a minimum. URL cleanliness is a crucial issue in dynamic PHP pages. Since such pages are produced with GET variables, the URLs look clumsy and nearly unreadable to search spiders. Use less number of GET variables to avoid URLs like “Page.php?var=abc&var1=def&var2=ghi” Instead, you can also make GET variables relevant by using keyword rich titles and terms. If the page requires more variables, you can combine the variables by delimiting them with a hyphen or an unused character and then, splitting them in the target page.
Mod_rewrite: Rewriting your URLs should be done after a lot of thinking since you cannot be varying your links over and over again. First choose on how you want to rewrite your URLs, then go ahead and implement it in your .htaccess file. For instance, a sample mod_rewrite rule would be like this RewriteEngine On RewriteRule ^(.*)/(.*)/(.*).html /index.php?act=$1&id=$2&page=$3 The first line starts the mod_rewrite engine, while the second line does the URL modification work. The second line dictates how to modify your actual URL like the one mentioned in part 2 of the RewriteRule.
Author Bio:
Dot Com Infoway is one of the leading IT company specializing in application development and web applications .To know more about the company’s PHP development stay PHP web developement
Posts Tagged ‘pages’
How to create search engine friendly PHP pages without technical hiccups
Saturday, January 23rd, 2010Seo – Blocking Search Engines From Pages
Friday, January 22nd, 2010Divergent to standard belief, the search engine spiders sent out by the major search engines do not have to search everything on a site. You can really technically keep a search engine spider away from a page by instructed it through a certain robots meta tag or a file not to come near the page.
Webmasters can instruct spiders not to crawl certain files or directories through the standard robots.txt file in the root directory of the domain. Additionally, a page can be explicitly excluded from a search engine’s database by using a robots meta tag. If for some reason you do not want a search engine spider to crawl a page you do have the means to do so.
When a search engine visits a site, the robots.txt located in the root folder is the first file crawled. The robots.txt file is then parsed, and only pages not disallowed will be crawled. But this is not permanently fool proof. Search engine spiders have a habit of going away from a page and then coming back and looking at the page a second time later. As a search engine crawler may keep a cached copy of this file, it may on occasion crawl pages a webmaster does not wished crawled.
Pages that most webmasters prefer not be crawled include login specific pages such as shopping carts and user-specific content such as search results from internal searches. Other pages that you might not want crawled, depending on the content might be a guest book that you expect to be to the top with spam or a pointer system that is not very flattering to you. It is also a excellent thought to instruct the spiders not to crawl a page with a lot of animation or flash on it as this can be mistakenly read by a spider as a malfunctioning site.
Dynamic Web Pages
Sunday, January 10th, 2010There are two types of websites that can be found online: dynamic and static. Static pages stay the same no topic what. No user can personalize these sites, nor are there any options to do so. Every visitor to that site sees the same information. In order to find new information on a static page, the user must navigate through links. Static pages are based on hypertext language and there’s nothing incorrect with having static pages. In fact, sometimes static pages are all a particular website needs in order to convey their information.
Dynamic pages, on the other hand, enhance the user’s experience online. Dynamic pages exchange with the user. They can be personalized, changed, and updated constantly. Databases can feed information to the site frankly without having any human contact, thus allowing the site to show the newest information. Dynamic pages can be used to show shopping preferences and for shopping carts in online stores. These carts contain all the bits and pieces a visitor desires to buy, then stores this information for the visitor in case they leave the site. Dynamic pages can work through cookies, databases housed on servers, or a combination of those elements. Here are some dynamic elements commonly found on websites:
Forms that allow a page to exchange in response to the information entered into those forms. This can include quizzes and other “check mark” type forms.
Sites that interactively link the user to music, pictures, and videos, like pages prepared in Flash.
Sites that run PHP, JavaScript, DHTML, or other dynamic web languages.
Search engines have a hard time with dynamic content. For example, search engines won’t crawl dynamic URL’s, which are URL’s that contain characters like ?, .cgi, cgi-bin, %, and other characters. They also won’t index JavaScript in most cases, though they will evenly take a cursory look at the code. Search engines certainly won’t index Flash sites, as they can’t read the Flash language. This is a shame because Flash is a fantastic way for some sites to use a dynamic interface.
The limitations of search engine spiders do not prevent sites from using dynamic pages, but. Using a dynamic interface isn’t automatically problematic, as long as certain precautions are taken. For instance, a Webmaster who makes a Flash site should place forward the exact same page in a non-Flash version for users who choose not to run Flash on their computers. Also, by providing non-dynamic links and providing others with non-dynamic links to the site, website owners can increase the likelihood that their site will gain in rank.
Robots.txt Files
Robots.txt files direct search engine traffic and help direct search engines to the right place. The file extension “.txt” is a text file format generally used for unformatted text. Simple programs like Notepad can be used to make and read .txt files.
In general, the robots.txt file is a .txt file that sits in the main root directory of a website site. So, for example, this file would probably look like http://www.yoursite.com/robots.txt. The purpose of this file is to direct search engine spider traffic, specifically by excluding information from a page. Why would anyone want to exclude any of their website from a search engine? If a name had an experimental site, a secret site, or a site that uses language that a search engine spider can’t read, they might direct the spider away from those pages using the robots.txt file. For fantastic information on building and maintaining these types of files, stay http://www.robotstxt.org/, a site devoted to web robots.
Clearpath Technology - Search Engine Optimization company based in New Delhi, India provides confidential categorize SEO air force for hundreds of agencies based in USA, UK, Australia, Amsterdam, Canada, and other countries. Dedicated 24 Hours Support.
Wordpress Basics – Pages vs Posts
Tuesday, December 15th, 2009
This video clarifies the difference between “pages” and “posts” in Wordpress and is part of a series of training videos on the basics of using Wordpress.