1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Dynamic sitemaps?

Discussion in 'Google Sitemaps' started by Sham, Jan 7, 2006.

  1. #1
    Hi folks, Google has been crawling my site for a while now, but for some reason, only my index page is being indexed, and my deeper pages are not.

    I think its about time I got involved with the scary google sitemaps.

    Now, my entire website is database driven, and the pages change in content frequently, and the structure of my internal links is also changing frequently. (for example, my index page has links to the 10 most recent pages within my site, and this list of links changes frequently).

    From what I've learned, there are several ways of creating a site map. The first is to manually enter the details of each of your pages, and the second is to use a sitemap generator which crawls your site and adss the details to the sitemap itself.

    But what if the sitemap file itself was a php script.
    Can we not just get a file called sitemap.xml and use a .htaccess directive to treat it as a php script.

    Then, when this .xml script is requested via google, it connects to my database, and generates and returns dynamically a XML output of URLS that are contained within my site?

    I suspect people are probably doing this allready. How has this worked out for you? Is there a problem with the fact that the file creation date of your sitemap changes with each request etc..?
    SEMrush
    Thanks,

    Sham.
     
    Sham, Jan 7, 2006 IP
    SEMrush
  2. Wiley

    Wiley Peon

    Messages:
    127
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I have been using and would recommend GSiteCrawler (find it with Google). Also sign up for Google Sitemaps. I thought my sites were pretty clean until I ran the program and found broken links and poor code that Dreamweaver did not find.
     
    Wiley, Jan 7, 2006 IP
  3. tkluge

    tkluge Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, this is possible. You have to send the corrent xml headers that Google can recognize the format. You can even sumit sitemap.php - .htaccess rewrite rules are not necessary.

    The other way around would be to create a xml sitemaps file. In your case - as I already wrote - I would write an input plugin for "kiting" release of phpSitemapNG. All you have to do is to submit the urls - with more details (e.g. lastmod, priority, ... if you like) - and phpSitemapNG will do the rest (create the sitemaps file(s) - if you have more than 50.000 pages, compress the sitemap file(s) - if you wish to, submit the sitemaps file to Google).
    If you are interested in this - drop me a private message and I'll help you to set this up.

    Best regards,
    Tobias
     
    tkluge, Jan 8, 2006 IP
  4. MaxPowers

    MaxPowers Peon

    Messages:
    261
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Interesting angle for the technically adept. Rewritten URLs may pose a problem with this unless you are familiar with regular expressions and use PHP's preg_replace function (or similar). This seems like a good investment of time and energy for a select few who commonly change existing filenames.

    For those unfamiliar with all of this or with filenames that remain the same over a period of time (once they the files are created) it may be a heck of a lot cheaper and easier to let one of the services like AutoMapIt handle this or to download something like GSiteCrawler and let those handle it all.

    Sites running multiple software packages like CubeCart, phpBB, link directories, image galleries, etc. may have a tough time integrating several databases into this one file, but it certainly would NOT be impossible at all.
     
    MaxPowers, Jan 11, 2006 IP
  5. Interlogic

    Interlogic Peon

    Messages:
    451
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #5
    all my submited sitemaps are .php or .asp files..

    Once your set the headers correctly it works just fine..

    This way your sitemap is always up to date without having to do anything..
     
    Interlogic, Jan 11, 2006 IP
  6. Interlogic

    Interlogic Peon

    Messages:
    451
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #6
    For that I would setup a seperate sitemap file for each software package and then have one sitemap index file that I submit to google..
     
    Interlogic, Jan 11, 2006 IP
  7. justinwp

    justinwp Peon

    Messages:
    81
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I made a quick little cron job script the other day to check for new entries in my database and automatically update my sitemap. Seems to work great and I don't have to worry about anything now.

    I also didn't mess with using htaccess. Instead i just used a php script and fwrite() to create a separate xml file.
     
    justinwp, Jan 12, 2006 IP
  8. ausidesi

    ausidesi Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    justinewp, do you mind sharing the cron job script?
     
    ausidesi, Jan 21, 2006 IP
  9. Caydel

    Caydel Peon

    Messages:
    835
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    0
    #9
    For what it's worth, for thos of you who use drupal, there is a gsitemap plugin at drupal.org which autogenerates your sitemap everytime google calls it.


    Brian
     
    Caydel, Jan 22, 2006 IP
  10. tarcea14

    tarcea14 Greenhorn

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #10
    Hey, I know this thread is old, but can someone help me with how to setup a phpsitemapng cron job for my site? Let me know, thanks
     
    tarcea14, Jul 26, 2010 IP