cakephp logo

Sitemaps made easy with CakePHP 1.2

Sitemaps are an essential aspect of most websites whether its just for SEO or simply to assist with user site navigation. CakePHP 1.2 makes sitemaps a breeze to create and what makes it even better is that CakePHP can generate portions of your sitemap automatically.

The Mental Ramblings site has an excellent article on how to set this up under CakePHP. If you follow this article you will easily create an XML formatted sitemap and optionally a user specific sitemap for your site. Static pages are the only links you will need to add manually, the rest for example posts can be generated automatically.

The sitemap I generated for google can be found here and the one for user navigation can be found here.

In terms of SEO the search engines, at the time of writing, that can make use of sitemaps are google and yahoo. With google having around a 60% search engine market share and yahoo around 21% it makes some form of sitemap worth while implementing.

A couple of things to note about google sitemaps, firstly the page importance number, google explains it as follows:

Show Plain Text
Text code
  1. The relative importance of pages on your site. For example, your home page might have a relative importance of 1.0, category pages have an importance of 0.8, and individual blog entries or product pages have an importance of 0.5. This priority only indicates the importance of a particular URL relative to other URLs on your site, and doesn't impact the ranking of your pages in search results.

The second thing to remember is to make sure your site links use the same relative path that has been set as your prefered path under your google webmasters. For example say you have set your preferred path as wiltonsoftware.com rather than www.wiltonsofware.com, then all site links should be relative to the path wiltonsoftware.com

Related

Filed under: Cakephp  Tags: Sitemap, Seo

0 Responses to “Sitemaps made easy with CakePHP 1.2”

Sorry, comments have been closed for this post.
(default) 11 queries took 5 ms
NrQueryErrorAffectedNum. rowsTook (ms)
1DESCRIBE `posts`17171
2DESCRIBE `comments`11111
3DESCRIBE `tags`221
4DESCRIBE `categories`220
5DESCRIBE `posts_tags`221
6DESCRIBE `categories_posts`221
7SELECT `Post`.`id`, `Post`.`url`, `Post`.`title`, `Post`.`icon`, `Post`.`metadesc`, `Post`.`metakeys`, `Post`.`categories`, `Post`.`tease`, `Post`.`body`, `Post`.`private_body`, `Post`.`created`, `Post`.`modified`, `Post`.`status`, `Post`.`allow_comments`, `Post`.`tags`, `Post`.`hitcount`, `Post`.`hitcount_rss` FROM `posts` AS `Post` WHERE `Post`.`url` = 'sitemaps-made-easy-with-cakephp-1-2' LIMIT 1110
8SELECT `Comment`.`id`, `Comment`.`post_id`, `Comment`.`body`, `Comment`.`author`, `Comment`.`url`, `Comment`.`email`, `Comment`.`ip`, `Comment`.`status`, `Comment`.`junk_score`, `Comment`.`created`, `Comment`.`modified` FROM `comments` AS `Comment` WHERE `Comment`.`status` = 2 AND `Comment`.`post_id` = (13) 000
9SELECT `Tag`.`id`, `Tag`.`tag`, `PostsTag`.`post_id`, `PostsTag`.`tag_id` FROM `tags` AS `Tag` JOIN `posts_tags` AS `PostsTag` ON (`PostsTag`.`post_id` = 13 AND `PostsTag`.`tag_id` = `Tag`.`id`) 220
10SELECT `Category`.`id`, `Category`.`category`, `CategoriesPost`.`post_id`, `CategoriesPost`.`category_id` FROM `categories` AS `Category` JOIN `categories_posts` AS `CategoriesPost` ON (`CategoriesPost`.`post_id` = 13 AND `CategoriesPost`.`category_id` = `Category`.`id`) 110
11UPDATE `posts` AS `Post` SET `Post`.`hitcount` = Post.hitcount + 1 WHERE `Post`.`id` = 1310