In this article we will be covering all things you should know about XML sitemaps and how you can create them using 2 popular plugins. At the end we will be reasoning what you should pick as per your needs to create XML sitemap for your website.
What XML Sitemaps Are?
XML sitemap is more like a list, which contains your posts, pages and attachments. XML sitemap tells google and other search engines how your site is structured. We all know search engines have something called spiders. What spiders does is interesting. They go through your sitemap and crawl posts, pages and index them. XML sitemaps govern those spiders and provide a set of instructions. Usually a sitemap consists of few things. URL portion, priority, change frequency and last modified date.
Should I Create a XML Sitemap?
Yes. Even though it doesn’t affect your search engine rankings, the creation of XML sitemap is on the top of your SEO checklist. It helps search engines to find your content more efficiently. It’s still not enough, you have to submit your sitemap to search engines allowing search engines to crawl through.
How to Create XML Sitemaps in WordPress
There are two approaches of creating sitemaps. We don’t recommend doing it manually because you have to update your sitemap manually every time after you publish a post or page. We recommend you to use one of these plugins to create XML sitemaps for your websites. When we publish a post, sitemap gets automatically updated. So we don’t have to worry about adding them manually. That is an added advantage of using a plugin to create XML sitemaps. Here are two best plugins you can use.
Alternatively you can use other plugins as well but we will only cover these two because we find them more beneficial. Please note that you should use only one plugin for this purpose. Don’t use more than one plugin.
Creating Sitemaps With Yoast SEO Plugin
Download and install Yoast SEO plugin in WordPress. Sitemap option is treated as an Advanced option so you need to activate Advanced SEO options in order to create your XML site. To do that go to
Yoast SEO -> Features tab. You will see an option called Advanced settings pages, enable this option.
Then go to the SEO menu in WordPress dashboard and click on XML Sitemaps link. Then click on the Enabled button to enable sitemap functionality. You can find your sitemap URL from this page. It will look like
You have now successfully created your XML sitemap. Please note, if you change other settings in this page make sure you know what you are doing. If you are a newbie just leave the default settings as they are. But you can tweak your sitemap to exclude or include any post type or attachment as you want. Here are some explanations about other tabs in XML Sitemap page. Do make the necessary changes only if you are comfortable enough to carry on.
- User Sitemap – You can manage whether to include your site’s users in sitemap to be able to crawled by search engines. We recommend to set this off.
- Post Types – In this Post Type tab you can select which post type to be included in sitemap. Every of your custom post types will be shown here. For most users it should be posts, pages and media (attachments).
- Excluded Posts – This option helps to exclude a specific article or specific set or articles from sitemap. Use comma (,) to separate post ID’s when you add multiple ID’s.
- Taxonomies – If you don’t want to add categories and tags to your sitemap you can disable it using this options tab.
Now you are all set. Let’s see how you can use Google XML Sitemaps plugin to create XML sitemaps.
Creating Sitemaps With Google XML Sitemaps Plugin
Download and install Google XML Sitemaps plugin. It will automatically create the sitemap for you. All you need to do is going
Settings -> XML-Sitemap page and tweak your sitemap as you needed. As you can remember in Yoast SEO plugin we had something like
sitemap_index.xml at the end of the URL, but in this plugin you will only see
sitemap.xmlportion at the end. The shorter more cleaner your URL will be.
When you scroll down you will see plenty of options to tweak your sitemap. You can tweak your sitemap by including or excluding items, but we recommend to keep default settings without modifying unless it’s absolutely needed.
Which Plugin Is the Best to Create XML Sitemaps?
In WP Snappy we are using Google XML Sitemaps plugin to have maximum control over our sitemap. That necessarily doesn’t mean Yoast SEO plugin is bad for sitemap creation. Both plugins are equally great while Google XML Sitemaps plugin offering few more extra options to tweak your sitemap. Yoast SEO plugin is a popular plugin among WordPress community and vast number of people use Yoast SEO plugin for on page SEO optimization, If you have already installed Yoast SEO we recommend to use the same plugin rather than loading an extra plugin to your site.
Google XML Sitemaps plugin is for those who seek for the maximum control over their sitemap.