Discuss PHP and SEO in the Search Engine Optimization forum on Dev Shed. PHP and SEO Search Engine Optimization forum discussing related topics such as Google, PageRank, Link Exchange, and Link Popularity. Improve your ranking in the Search Engines by employing good optimization techniques.
Posts: 554
Time spent in forums: 4 Days 11 h 36 m 13 sec
Reputation Power: 4
PHP and SEO
I do the majority of my coding with PHP/MySQL and was wondering how this effects SEO. Many of my pages will display information dynamically from a database. Do the bots see the PHP, or the HTML that it outputs?
Also, like any other lazy PHP coder, I tend to use variables in my URL to decrease coding time. For intance, if I have an article.php file which displays an article based on the var aid, will each article be indexed? If I link to these articles on a static page will they be indexed? What other things should I consider when coding in PHP for SEO?
__________________ Supadupa Web Design - Tutorials for the Serious Web Developer
Posts: 14,266
Time spent in forums: 1 Month 1 Week 1 Day 23 h 15 m 4 sec
Reputation Power: 744
Quote:
Do the bots see the PHP, or the HTML that it outputs?
What does your browser see? A bot is a browser.
Quote:
For intance, if I have an article.php file which displays an article based on the var aid, will each article be indexed?
Different engines do different things and different people will tell you different things (b/c they were told by somebody else). Some say Google will support up to one query string variable (eg, ?aid=4, but not ?aid=4&foo=bar), but that it shouldn't be ?id=
It is best to hide your query strings, which can be accomplished on an Apache server with mod_rewrite or the ForceType directive.
__________________
# Jeremy
Explain your problem instead of asking how to do what you decided was the solution.