XML Sitemap

Search engines such as Google, Yahoo!, and Bing crawl sites all the time, looking for snippets of text that will tell them what a site is about. An engine typically finds a hyperlink that links to a piece of content that in turn links to more content, thus recursively searching a site or sites. This method doesn't allow the search engine to find everything, and it doesn't tell the engine what is and what is not important on your site. For example, if your contact page contains numerous links to other content or other sites, is that considered important? Also, how often should the search engine come back and look for new information? Should it check once a day, once a week, or every few months?

The XML Sitemap module helps search engines find your best and most relevant content by creating categorized and prioritized lists of your site's information. It might help to think of this list as a directory of your site. You then provide this list to the search engines to help them understand your site's content, how often it is updated (which tells them how often they should check back), and where to find your content. In other words, the module helps search engines crawl your site more intelligently and efficiently, which can lead to better search rankings.

After you have created a sitemap with the XML Sitemap module, you can use the Site Verification module to automatically submit this sitemap to Google, Yahoo!, Bing, and other search engines. The Site Verification module also comes with several sub-modules that create sitemap links for menu items, content types, taxonomy terms, and even user profiles.

In the following exercise, you will configure the XML Sitemap and the Site Verification modules.


Creating Your XML Sitemap

In this exercise, you will configure the XML Sitemap module to prepare your site for submission to Google, Yahoo!, Bing, or other search engines.

1. Download and install the following modules:

^ XML Sitemap (version 2): http://drupal.org/project/xmlsitemap ^ Site Verification: http://drupal.org/project/site_verify

2. Enable the following modules, which are a part of XML Sitemap and Site Verification:

> XML Sitemap

> XML Sitemap Node

3. Navigate to Configuration C> XML Sitemap. Verify that a sitemap is being generated for your site's language under Settings, as shown in Figure 19-1, and write down your site's language-specific URL (for example, http://localhost/sitemap.xml) here:_

4. Scroll down the page and open Content Types, as shown in Figure 19-2. Verify that the correct content types are being included in your sitemap.

NOTE XML Sitemap also contains modules that will include menus or taxonomy terms.

5. Modify the priority of Articles to be higher than that of Pages. To do this, Navigate to Content types and click edit next to the Article content type. At the bottom of the content type's configuration, modify the XML Sitemap settings to set the Default Priority higher, as demonstrated in Figure 19-3.

6. Repeat this process for Pages, setting the Default Priority to 0.2.

7. Run cron manually to create your first sitemap. Navigate to Reports C> Status Report, and then click Run Cron Manually.

How It Works

On each cron run or when content is added, edited, or updated, XML Sitemap will generate a new sitemap according the settings at Configuration C> XML Sitemap. Each piece of content can contain a priority number that tells search engines what content is most relevant on your site. In this exercise, you modified the default for all Articles to be higher than Pages. Note that cron must be routinely running for XML Sitemap to work correctly.

Corner The Local Search Engine Market

Corner The Local Search Engine Market

Four Steps to Ensure your Business will Capitalize from Local Google Search Exposure. We live in an age where everyday more and more people are connecting online. The internet is more of a household necessity than passing fad.

Get My Free Ebook

Post a comment