google and dynamic pages

Mikejf

Free Member
Mar 5, 2008
221
6
Swindon
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?
 
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
 
Upvote 0
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.
 
  • Like
Reactions: matt.chatterley
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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)

Mikes plumbing - 03663 566332 - (with link to 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
 
Upvote 0
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.
 
Upvote 0
Well the only place to link to 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 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.
 
Upvote 0
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.
 
Upvote 0
Upvote 0
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.
 
Upvote 0
...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
 
Upvote 0
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

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
 
  • Like
Reactions: Mikejf
Upvote 0

Latest Articles