Google (XML) Sitemap Generator Plugin Help

Maintenance of this plugin has been taken over by Auctollo. You can find all up-to-date information on their website. If you need support, please use the forums or contact the new maintainer. Thanks!

Welcome to the new help page of the Google Sitemap Generator Plugin for WordPress. This help page is valid for the version 4 of the plugin and newer.

General Questions regarding XML Sitemaps

What is a Google Sitemap?

Basically, a Google Sitemap is a file which contains URLs and some additional information for all public pages or documents of your website. Google and other search engines can read this file and add the defined pages to their index.

How can I create Google Sitemap for my WordPress blog?

That is the major function of the Google Sitemap Plugin for WordPress. It is easy to install and will generate a sitemap containing all your WordPress content.

Will Google Sitemaps affect my ranking?

There are no evidences that a Google Sitemap will directly affect your ranking. However, it can help Google to index and crawl your page better which may result in a more complete index of your page.

Questions regarding the installation

How do I install the plugin?

Just install it like any other WordPress plugin. The easiest way is via the “Add plugin” function in WordPress. If that doesn’t work for you, download it to your computer and upload it via FTP to your wp-content/plugins directory. You don’t need to change anything in your webserver configuration, file permissions or upload any other files.

Do I need to change any settings?

The default settings are fine for most blogs. Feel free to change the priorities, change frequencies or what you want to include in your sitemap. If you ever need to reset the settings to their default values, click the button at the end of the settings page.

Settings explained

Update notification

  • Notify Google about updates of your Blog: This will ping Google every time you publish a new post or edit an old one. Google will fetch your sitemap afterwards and probably index your new post soon.
  • Notify Bing about updates of your Blog: This will ping Bing every time you publish a new post or edit an old one. Bing will fetch your sitemap afterwards and probably index your new post soon. Since the Yahoo Search is powered by Bing, your posts should also appear in Yahoo soon.
  • Add sitemap URL to the virtual robots.txt file: If activated, the plugin will add the URL of your sitemap to your robots.txt file. This allows search engines, which don’t support the ping notification like Baidu or Yandex, to find your sitemap. The sitemap is generated by WordPress, so make sure there is no robots.txt file saved in your blog directory!

Advanced options

  • Try to increase the memory limit: This option should actually not be necessary anymore, but if you ever get an out-of-memory error while requesting your sitemap, you can try to increase the limit here.
  • Try to increase the execution time limit: Similar like the memory limit, but his one defined the maximum execution time.
  • Include a XSLT stylesheet: Normally an XML sitemap just looks like a XML document, which is hard to read by humans. The plugin comes with a special stylesheet, which makes it more readable. Just keep the “use default” option checked to use it, or enter the full URL to your own stylesheet if you want to use another one. Please make sure it is on the same domain!
  • Override the base URL of the sitemap: Use this option if you want your sitemap to appear in the root of your domain in case WordPress is installed in a sub-directory. Please refer to this section of the help page for more information.
  • Include sitemap in HTML format: If activated, the plugin will also generate a sitemap in HTML format. This can be useful for bots which don’t understand the XML standard.
  • Allow anonymous statistics: This will send some anonymous statistics to the author of the plugin. It will send the following data: Plugin Version, WordPress Version, PHP Version, language, the number of posts in your blog (in steps by 50) and a unique string to avoid duplicates. Why is this useful? I can optimize the plugin for the most used WordPress / PHP versions and improve the translations for the most common languages. The plugin will NEVER send anything personal, for example your blog url, title, name or email address. There is no way to find out who is using the plugin for what.

Additional pages

  • Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress. For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com
    Note: If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory. Please see here how to do that.

Post priority

  • Do not use automatic priority calculation: All posts will have the same priority in your sitemap. It can be defined under “Priorities”
  • Comment Count: Uses the number of comments to calculate the priority of the posts.
  • Comment Average: Uses the number of comments to calculate the priority of the posts. The calculation base is the average number of comments per post.

Sitemap content

  • WordPress standard content: Check the items you want to include in your sitemap.
  • Custom taxonomies: Check all the custom taxonomies you would like to include.
  • Custom post types: Check all the custom post types you would like to include.
  • Include the last modification time: This will add the last modification date to all your entries in the sitemap. Search engines can use this information to revisit the page again if it has changed. It is strongly recommended to keep this option activated.

Exclude items

  • Excluded categories: If you exclude a category here, no posts from this category will appear in your sitemap.
  • Exclude posts: Use this option to exclude specific posts from the sitemap. You need to enter the ID of the post, which you can find under the “Edit Post” screen of WordPress. Separate multiple posts by comma.

Change frequencies / priorities

  • Change frequencies: With this settings you can give search engines a hint, how many times the content of your blog changes. Note that it is up to the search engine how many times older content is rechecked again.
  • Priorities: With this settings you can give search engines a hint, how important the content of your blog is. This value is always in relation to all other content of your blog, so setting everything to highest (=1.0) doesn’t make any sense.

Other features

Move your sitemap to your domain root

If your Blog is located in a sub-directory (example.com/blog/) your sitemap will be generated under example.com/blog/sitemap.xml. If you want to move your sitemap to example.com/sitemap.xml, please enter “http://example.com/blog/” under “Override the base URL of the sitemap” at the plugin settings page and add the following rewrite rule to your .htaccess file under your domain root: !!

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^sitemap(-+([a-zA-Z0-9_-]+))?\.xml(\.gz)?$ /your-blogdir/sitemap$1.xml$2 [L] 
</IfModule>

Replace “your-blogdir” with the name of the sub-directory of your WordPress installation.

Common problems

Google Webmaster Tools shows 0 indexed pages

Sometimes you might experienced the issue, that Google Webmaster Tools shows some pages of the sitemap as “submitted”, but not as “indexed” or the number of indexed pages is lower than the submitted ones. Please verify the following:

  • That you have verified the right website. As explained in this blog article, Google differentiates between http / https, www / non-www and root / subfolder. So if you run your blog on http://www.blog.com/ make sure you add http://www.blog.com/ to Google Webmaster Tools and http://www.blog.com/sitemap.xml as your sitemap. If you add http://blog.com/ or https://www.blog.com/ you will NOT see indexed pages!
  • That your sitemap does not have any errors. Your sitemap might contain warnings, for example if your website was loading slowly when Google tried to crawl it. This is not an issue with your sitemap
  • If your sitemap contains links to pages which are not available, try to find them in WordPress and check which plugins you have installed. The plugin reads all posts from the post table which are published and don’t have a password. If something appears in your sitemap, it is in your WordPress database.
  • As a last note: The statistic in Google Webmaster Tools are NOT realtime. They are for information purposes only. Use the “site:” operator in Google Search to find out which pages of your blog are really currently indexed. It might take a few hours or sometimes even days until new URLs show up as indexed in Google Webmaster Tools, but actually they are included in the search results already.

Google Webmaster Tools reports “Missing XML tag”

This usually happens if Google reads a sitemap without any content. Check the sitemap and see if there are any URLs inside. If not, please try the following:

  • If the problematic sitemap is sitemap-externals.xml: Did you add any external pages? If so, please check if the URL for each of them is correct. Also make sure there is no empty line in the “Additional pages” section of the plugin settings page. Please also try to save all settings again using the “Update Options” button at the end of the page.
  • If the problematic sitemap is sitemap-archives.xml: If you don’t have any posts (only pages), you can disable the “Include archives” setting under “Sitemap content” to resolve this issue.

Google Webmaster Tools reports “Invalid XML” or my Browser says “error on line XX at column 6: XML declaration allowed only at the start of the document”

Please open your sitemap in your browser and chose “View Source”. Is there a blank line or whitespace in front of the XML tag? That’s the problem. Probably your RSS feeds do also not work. The reason for this problem is a new line or a whitespace in another plugin or the functions.php file of your theme. Check that the functions.php file ends with ?> and there is no blank line or whitespace after it. If that doesn’t work, try to disable other plugins one-by-one to find the bad one. As a temporary workaround, you can also try this fix.

Google Webmaster Tools reports “Sitemap is in HTML format”

That happens from time to time and is an issue in Google Webmaster Tools. Try to resubmit your sitemap and wait, normally it goes away after some time.

Google Webmaster Tools reports “404 Not found” for the sitemap

  • Check your permalinks settings of WordPress and click the Save button there.
  • If you are using nginx as a webserver, please add the Rewrite Rules manually. They should be displayed at the Plugins settings page.
  • If you are using W3 Total Cache and activated the “Do not process 404 errors for static objects with WordPress” feature under “Browser Cache”, please add the rules stated below to the “404 error exception list”:
    [a-z0-9_\-]*sitemap[a-z0-9_\-]*\.(xml|xsl|html)(\.gz)?
    Newer versions of W3 Total Cache (> 0.9.4) already include this fix.

My Sitemap does not update

Are you sure about this? With version 4, the plugin uses a new format for the sitemap. Please read this article for details. In your main sitemap (sitemap.xml) there is only one entry per month for your posts. Click the current month or any other sub-sitemap to see the actual posts. There you will probably also find your newest post!

Other topcis

Why does my sitemap look different than before?

Version 4 introduced a new, more flexible and efficient format for your sitemap. Please read this article for details.

My question is not answered here

If you have a problem with the plugin and is not handled here, you can visit the support forums. Please read this topic first before opening a new thread!.

I’ve seen your name on website XYZ and have questions regarding the content.

With a 99.9% chance I am not affiliated with the website you are talking about. The website is probably using one of my WordPress plugins and you have found a note about that. Please try to find out the real website owner and don’t contact me. I also can’t help you finding the right person. Sorry!