An XML sitemap is a special file that search engines use when they crawl your site. This file is an essential part of SEO. The XML sitemap contains some important pieces of information that search engines need when crawling your site.
This guide walks you through the simple steps needed to create your XML sitemap and submit it to Google and Bing.
First, you want to make sure you have activated the XML Sitemap module in the Feature Manager.
If the module is activated, you will see XML Sitemap listed under the All in One SEO menu. Click on this to configure the settings.
Now let’s create our XML sitemap. First, make sure the Filename Prefix is set as sitemap. Google prefers this filename prefix so it’s best not to change it.
Next, in the Schedule Updates drop down, select the schedule that best matches how often you update the content on your site. If you’re not sure what to select then choose Weekly.
The next option is Enable Sitemap Indexes. DO NOT check this box unless your XML sitemap contains over 50,000 URLs. We’ll revisit this option later in this guide.
The next two options are to do with the content on your site – Post Types and Taxonomies. Using the checkboxes here, you can choose which content you want included in your XML sitemap. Check the boxes next to the post types and taxonomies you want to include.
If your site is a news website that has date archives then check the box to Include Date Archive Pages.
If you have a site where you have multiple authors with their own author pages then check the box to Include Author Pages.
Make sure that the Create Compressed Sitemap box is checked. This will create a Gzipped sitemap which can be submitted to search engines. This file is compressed so it’s faster for search engines to fetch it. This is extremely useful if you are on a slow server.
Make sure that the Link From Virtual Robots.txt box is checked. This will add the URL of your XML sitemap to the virtual robots.txt file that WordPress creates.
Make sure that the Dynamically Generate Sitemap box is checked. This option will dynamically generate the XML sitemap each time it is requested by a search engine. It also means that there will not be an XML sitemap file on your server. This is the optimal option because it means that the XML sitemap is always up to date when it is requested, and there is no file that could get deleted or become corrupt or unreachable. Some older servers may not support this option so if you’re having problems, try unchecking this box.
Finally, scroll to the top of the screen and click the Update Sitemap button. You have now created your XML sitemap. You can view it by clicking the view sitemap link and your XML sitemap will open in a new tab. If you see a blank XML sitemap, don’t panic, right click on screen and select View Page Source. You should now see the XML code for the sitemap.
We discussed the option for Enable Sitemap Indexes earlier in this document. You should only use this option if your XML sitemap contains over 50,000 URLs. Now that you have created your XML sitemap you can see at the top it will show how many URLs the sitemap contains. If this number exceeds 50,000 then use the Enable Sitemap Indexes option. Read the documentation here to learn more about this option – http://semperplugins.com/documentation/xml-sitemaps-module/#enable-sitemap-indexes