views:

43

answers:

2

Hi, I have a website live cricket scores , in which dynamically i am controlling the news section. I have my own custom build CMS system with PHP, where admin will add the news to the web portal.

If i generate the Sitemap, all dynamically created pages wont be added to the sitemap,

is this a good practice or do we need to add the dynamically created links in sitemap? if yes, can you please share how we can add dynamic links?

One more observation, I have made, whatever the news which is added getting cached within 4 Hrs in google.

Please share your thoughts, thanks in advance

+1  A: 

If the pages are important, then you should add them to the site map so they can be indexed for future reference. However, if the pages are going to disappear after the match, then I wouldn't put them on the site map as they may get indexed then disappear, which may have a negative impact on your search engine rankings.

You can add these dynamic pages to a site map in a couple of ways:

  1. Whenever a new dynamic page is created, re-create your site map. Do this by looking through the database for the pages which will be valid and writing them out into an XML site map file.

  2. When a new page is created, read the current XML site map, and insert a new entry into the relevant place.

I would say the easiest option is option 1 as you can quickly and easily build a site map without having to read what you already have. That option also means that when you remove a one of the dynamic pages, it will be removed from the site map when it is re-built without the need to read through what you have, find the entry and remove it.

Google code has a number of different options for you, some of which you can download and run, others look like they need implementing within your own code.

gabe3886
A: 

Yes, if these pages content needs to be referenced by search engines, of course they have to be in sitemap.

I worked on a lot of ebusiness website and of course, almost 99% of pages where dynamically generated, almost 1000 product pages versus the 3 sales conditions & legal static pages.

So the sitemap itself was dynamic and regenerated every 15 minutes (to avoid dumping the whole product base each and running thousands of queries each tim the sitemap is called).

You can use a sort of separate script to do this : I would do one static part template if you have static page, and one other embedding the dynamically generated urls. It would be easier if you CMS already embed url management (or routing) system.

Benoit