View Full Version : google and dynamic pages
Mikejf
21st July 2009, 20:46
I'm interested to know how google reacts to dynamic pages such as PHP.
I set up a basic business directory site that has a database where the companies details are stored. It all works great but the search results are displayed on a page called search_results.php.
Although this is fine for displaying all the matches for the searches, I don't think it will help the individual companies being found on google.
I'm guessing a static page for each company would have to be created to enable google to find them. Am I correct?
fzx5v0
21st July 2009, 20:54
Hi
Static pages a mutch better but that does not mean that you have to change your dynamic page to a static page.
You could use URL re-writes to achive this
thanks
OldWelshGuy
21st July 2009, 21:01
just understand that google can't carry out a search, it can only follow links to pages, and you are in with a shout of getting it right. If an action has to be taken in any sort of form, to get at the info, then spiders can't find it. You can always hard code search results though.
david64
21st July 2009, 21:43
Google cannot tell dynamic pages from static. Personally, I would not have search result page indexed.
As OWG says you are going to want some links to specific pages like for the individual companies and/or for categories, e.g. SEOs in Slough.
ComputerCoders
21st July 2009, 22:19
You need to edit .HTACCESS to change pages to static.
cmcp
22nd July 2009, 00:51
You could set up a page that will output a result on each page (eg in the format "output.php?id=result-number-one") then set use the htaccess / mod_rewrite of apache to rewrite the pages as "result-number-one.htm".
Have a fish around for mod_rewrite, .htaccess, dynamic to static URL, google static pages crawl, or something like that and you should find some answers.
UKSBD
22nd July 2009, 08:08
You have to add the search string to search_results.php
Try the 2 top search buttons on this page to see the difference,
http://www.uksmallbusinessdirectory.co.uk/search-demo.html
and then create hard links to the pages.
See my site as an example it has category search, County Search
and Town Search links accross the top.
Using county as an example,
http://www.uksmallbusinessdirectory.co.uk/all-counties.asp
everything is pulled from the database, but it creates the hard links.
You can then do things like this,
http://www.uksmallbusinessdirectory.co.uk/a.asp
Which in effect, is creating multiple sitemaps as the navigation structure.
Mikejf
2nd August 2009, 13:15
OK, so would a good way to go is for example,
user searches for plumbers
results.php shows a list of all the plumbers names and phone numbers with a link to a static .htm page
e.g.
Johns plumbing - 01235 456678 - (with link to www.directorysite.co.uk/johns-plumbing.htm (http://www.directorysite.co.uk/johns-plumbing.htm))
Mikes plumbing - 03663 566332 - (with link to www.directorysite.co.uk/mikes-plumbing.htm (http://www.directorysite.co.uk/mikes-plumbing.htm))
This way there will be a static page with the plumbers company details including a link back to their website. The page could contain keywords etc as well, which I understand will help SEO.
Thanks
cmcp
2nd August 2009, 13:22
Possibly if all the static .htm pages were linked up from somewhere to begin with.
Remember the first rule - Google can't perform any actions. In your example there "user searches" is an action.
If you can output all these static pages and link them all up without the need for the user to search then you've got yourself a crawlable site.
Mikejf
2nd August 2009, 13:30
Well the only place to link to www.directorysite.co.uk/mikes-plumbing.htm (http://www.directorysite.co.uk/mikes-plumbing.htm) would be from the results.php page, which is dynamic so I'm not sure how else to do a directory listing that will help SEO.
If you look at my site - www.theswindondirectory.co.uk (http://www.theswindondirectory.co.uk) you will see how the results are displayed. As these results are on a dynamic page, Google will never see them, which is why I thought of the above suggestion.
cmcp
2nd August 2009, 13:35
You are on the right track - but you need to write the site in such a way that the pages are generated automatically.
All your data is stored in a database. You need to read that data in for each entry and get them all linked together so that search button doesn't need to be pressed.
Eg, for your example above have all the sections listed on the main page /plumbing.htm /accomodation.htm /eating-out.htm etc.
On these pages you'll have the results displayed /mikes-plumbing.htm etc.
You may need to speak to a developer to take you through the technical steps of how to achieve this, but it is very possible. This is how ecommerce sites and lots of other directory sites work.
UKSBD
2nd August 2009, 14:13
You need to create a page with a A link to the pages,
take a look at my Swindon page,
http://www.uksmallbusinessdirectory.co.uk/towns-listed.asp?strTown=Swindon
it is basically just a sitemap,
one lot of links to categories in Swindon, and another lot of links to
individual businesses in Swindon.
Mikejf
2nd August 2009, 14:26
But the company Silbury is listed in a page...
http://www.uksmallbusinessdirectory.co.uk/business-listings.asp?strCompanyName=Silbury
Surley this is a dynamic page - business-listings.asp with the variable strcompanyname=Silbury, which Google will never enter?
UKSBD
2nd August 2009, 14:38
But the company Silbury is listed in a page...
http://www.uksmallbusinessdirectory.co.uk/business-listings.asp?strCompanyName=Silbury
Surley this is a dynamic page - business-listings.asp with the variable strcompanyname=Silbury, which Google will never enter?
Which is why site navigation is so important.
Google follows the links to it which effectively creates the page.
The page itself doesn't exist, it's the links that create it.
Mikejf
2nd August 2009, 14:52
Ah I see.
I think they way I will do it then is have a static .htm page for each company and a static page for each category, linking to each company.
Thanks for all your help.
UKSBD
2nd August 2009, 15:04
the pages for each company and each category can be dynamic, they
don't need to be static.
Mikejf
2nd August 2009, 15:20
But surley there need to be a static page somewhere so google can find them.
Am I right in saying anything after the ? in the address is ignored by google.
eg.
www.directory.co.uk/company.php?id=10 (http://www.directory.co.uk/company.php?id=10)
will be seen by google as
www.directory.co.uk/company.php (http://www.directory.co.uk/company.php)
DotNetWebs
2nd August 2009, 15:24
...Am I right in saying anything after the ? in the address is ignored by google...
No that is a query string and Google can read query strings.
Best keep them to a minimum though. Even better dynamically rewrite the page to an (apparently) static URL.
Regards
Dotty
Mikejf
2nd August 2009, 15:31
I'm a bit confused then as a dynamic page isn't live until the user has clicked the search button (in this example).
How would google know someone has searched www.directory.co.uk/company.php?id=10 (http://www.directory.co.uk/company.php?id=10)
DotNetWebs
2nd August 2009, 15:39
I'm a bit confused then as a dynamic page isn't live until the user has clicked the search button (in this example).
How would google know someone has searched www.directory.co.uk/company.php?id=10 (http://www.directory.co.uk/company.php?id=10)
This has been answered above:
Which is why site navigation is so important.
Google follows the links to it which effectively creates the page.
The page itself doesn't exist, it's the links that create it.
Regards
Dotty