7

I developed a website that has only one page in the public html directory (index.php). All content is dynamically loaded as different pages.

I believe that what we type into this site is stored in a database, and that the search engine finds these pages like any static pages...

How can I SEO my pages for Google?

Maximillian Laumeister
  • 16,461
  • 3
  • 32
  • 63
S L
  • 177
  • 1
  • 5

2 Answers2

4

If you want to SEO page contents you need 1st to apply Google Webmaster guidelines (at least the basic guide) to your dynamic generated pages, therefor you need your dynamic page to set properly in page at least the <title> and <h1>, <meta description> by retrieving this contents from the DB. It should be different for each page, Google seems to dislike repeated contents and final users dislike them too.

Then if you want to SEO page URLs, you basically needs to make URLs more human readable, as for a very general example: if a page talks about 'cats' the url should be something like: http://...index.php?id=cats (or maybe better http://.../cats) just avoid http://...index.php?id=54637 In order to accomplish this task here they suggested me to create in DB table an alias field for each item/article, so supposing your DB primary key is an integer just cerate a another field called 'alias' (this field muts be UNIQUE no duplicates, as for the primary key) and use it in your URLs.

Marco Demaio
  • 6,500
  • 5
  • 34
  • 43
4

Search engines have no idea your content comes from a database. All they see is the HTML your server side code generates. So, there are no special rules, tips, or techniques for database generated content. The same rules as any other content, dynamic or not, apply (see Marco's answer).

(Before someone says you need search engine friendly URLs I should point out that isn't specific to database content which is what this question is asking. SE friendly URLs apply to any kind of dynamic content and static content as well).

John Conde
  • 86,484
  • 28
  • 150
  • 244