Google Sitemaps Cron Job
I've recently set up a cron job to run the Google Sitemaps Python Script automatically each day. This automatically notifies Google of any changes to the site. I've found that new pages are being indexed very quickly.
There are plenty of good articles out there about how to use the script provided by Google but I struggled to find information on how to set up the cron job for the task.
So in case anyone else needs it here’s a cron job that works for me on Unix. You need to make sure you specify absolute paths. If you don’t have root access then talk to your host but they should tell you where python resides. If you want to find out your document root you can find this in PHP by using the phpinfo() function.
This runs the scheduled task of generating a sitemap each day at 6am.
0 6 * * * /enter/your/path/to/python /enter/your/path/to/sitemap/_gen.py --config=/enter/your/path/to/example/_config.xml
Tags
Can you help make this article better? You can edit it here and send me a pull request.
See Also
-
Google Sitemaps. Google opening up?
Google’s patent filing started the inevitable process of Google being more transparent in the way it conducts its business. Slowly but surely Google is beginning to help web developers to produce sites that help Google to do its job, namely indexing the internet. The Google Sitemaps site describes clearly what Google would like you to do. After modifying a config file, a bit of root access and a cron job you can be there in minutes. -
Why Isn't My Site Top Of Google?
One of the most common questions asked by clients is 'Why isn't my site top of Google?' This is totally understandable but explaining rankings in search engines can be a mystery. This article attempts to discuss some general principles to improve rankings.