Skip to main content
Inspiring
November 10, 2011
Question

SEO question about dynamic site URLs

  • November 10, 2011
  • 1 reply
  • 1273 views

Would just appreciate some advice on this.

I've taken over a site that currently has a static page for several businesses listed

eg www.mywebsite.com/businessname/

These have all been created in Wordpress, and currently the only search function is using a Google Maps API to find businesses by location.

The plan now is to improve the search function, and so I'm thinking the site is ripe to have a database developed, so that we can have any number of searchable fields.

At the moment a lot of the static pages do quite well with search engines, so I don't want to undo any of that if possible.

My understanding is that Google used to struggle with dynamc links like www.mywebsite.com/businesses?id=101, but can now handle them OK.

I've also sussed that I should be able to use the mod_rewrite engine to create URLs of the form www.mywebsite.com/businessname/

So my question is really how to best go about this and if possible a. use a database and b. retain the business name in the URL?

And I don't quite get how it works with the search engines, as I assume the individual URLs don't exist per se, but are only ever created on the fly when a user clicks through to a details page, rather than there being distinct pages on the server for Google to trawl through.

Thanks for any advice.

This topic has been closed for replies.

1 reply

Rob Hecker2
Legend
November 11, 2011

Firstly, Google has absolutely no problem with dynamic urls. Google follows the links through the menu system etc, pretty much as a user would.

You are saying you want to write a search routine to search the content stored in the database? Don't use LIKE. Read up on using the MATCH method for mySQL. Here is an example:

$query1=$dbh->prepare("SELECT *, MATCH(description, title, content) AGAINST (:term IN BOOLEAN MODE) AS score FROM pages WHERE MATCH(description, title, content) AGAINST (:term IN BOOLEAN MODE)  ORDER BY score DESC") ;

You can use the business name in the url if you make them unique, so instead of using ?id=101 it can be ?id=businessname, then use a rewrite rule to turn the ?id= into a slash, making it look like the urls you now use.

Inspiring
November 11, 2011

Thanks Rob.

I'm still not quite sure how it works - although Google has no problem with dynamic URLs, I'm not sure how it sees them if they don't exist.

At the moment, if there's a static page www.mywebsite.com/businessname, it can find that URL in its physical location.

But with dynamic sites, there isn't a URL / file for each business, just a dynamically created one.

Or is Google clever enough to look them up and create each dynamic URL itself as part of its search?

ie can Google return a search result that is a dynamic URL?

This is important for the site owner, as at the moment businesses that are listed on his site are often returned quite well up the rankings.

Rob Hecker2
Legend
November 11, 2011

"Can Google return a search result that is a dynamic URL?"

Absolutely.

When a person goes to a dynamically built website they have no idea that the whole thng is created on the fly as they navigate through it. It works just like an old fashioned site where the pages just sit there waiting for visitors (except better). As I explained already, Google just moves through the site the same way. Don't get hung up on this point. Virtually all of the important website on the internet are built dyanmically. If Google couldn't handle that fact, then Google would have died ten years ago.

"But with dynamic sites, there isn't a URL / file for each business, just a dynamically created one"

You are thinking in the wrong way. There is indeed a url for each business, it's dynamic.