How to Set Up The Google XML Sitemaps Plugin

The search engines need a sitemap to enable them to find and index all the pages on your site. On large, complex website, a sitemap shows them where to go to find the deepest pages.

Firstly, why would you want to install the Google XML Sitemaps Plugin?

Because it’s a well-established, reliable and highly functional plugin that creates a sitemap for the Google and Bing search engines, automatically re-builds itself whenever you write or edit a post and pings those search engines as soon as you publish it.

Underestimate the value of that at your peril!

All your sites should have XML compliant site maps because they help the search engines work out what it’s about. And they can’t send you traffic if they don’t know that!

But a normal static sitemap that you can create at any number of places on-line needs to be updated manually every time you add or remove a page.

A bit of a pain.

The Google XML Sitemaps Plugin does everything automatically. A huge time saver.

Further, if your blog’s in a sub-directory you can locate your Sitemap Generator in the root folder and have it generate a sitemap for your entire site – not just your blog.

That’s really cool.

So here’s how to set it up

Step 1: Click on the XML-Sitemap link in the Settings section of your menu.

You’ll see this screen:

The top section (above Basic Options) just gives you key information about the last time your site map was built. Unless you’ve initiated a manual build, this will be the time of the last post you published.

Step 2: Set some initial options in the Basic Options section.

I normally check all of the options except ‘Include sitemap in HTML format’. This option doesn’t create a sitemap that you can view from the front of the site, so I don’t need it.

The Advanced Options are all about improving the efficiency with which the plugin operates – by increasing memory, limiting the time it’s allowed to take to re-build the sitemap or limiting the number of posts to be included.

Unless you’re experiencing problems with your sitemap taking too long to re-build itself after publishing a post, you should not normally need to touch any of these.

Step 3: Additional Pages.

If your blog is in a sub-directory and you want the XML Sitemap to include other (non WordPress) pages from your site, then you should add the address of your root or other directory in this section.

Click the ‘Add New Page’ link at the bottom of the section and enter the details.

You’ll also need to move your sitemap.xml file to the directory you’ve specified (covered in the next section).

Step 4: Set the post priority calculation method (see 2 in the image above).

Prioritisation is a way of directing the robots to the most important pages on your site.

I do not use automatic prioritisation, so I check the top radio button.

Automatic prioritisation frequently results in the index page of your blog (the starting page) getting the highest priority and all the others getting the same priority just below it.

I prefer more granularity and I also prefer my posts to have a higher priority than my home page. This is because I take care to optimise each of my posts, so giving them a higher priority here makes the best use of the optimisation I’ve done.

I also like to raise the priority of my static pages.

For some strange reason the actual setting of priorities in the plugin is done at the bottom of the page rather than here, so I’ll come back to that later with a screen shot

Step 5: Define the location of your sitemap file.

On the site from which these screen shots come, WordPress is installed in the root directory and there are no other files or pages in the domain. Therefore I’ve just accepted the default location setting.

On another of my sites, though, WordPress is in a sub-directory and on that site I’ve moved the sitemap file to the root directory so I can have it map all the pages on that domain.

If you do that you need to specify both the path to the sitemap file and the URL of the sitemap file. The plugin will suggest both elements – see the examples above – just edit them as necessary.

(I’ve blacked out the actual paths for my sitemap in the image above, but where the blacked out bits are the plugin will suggest the path based on your actual server set up and sitemap location).

Step 6: Sitemap content (second section in the image above)

In this section you can specify what should be included in your sitemap.

Removing unnecessary content reduces the sitemap build time during your post publishing process, and that will speed up the publishing of your new articles.

I’ve excluded the ‘following pages of multi-page posts’, ‘categories’, ‘tags’, ‘archives’ and ‘author’ pages.

Archives and author pages because the content of these pages is already indexed in posts and static pages, and following pages of multi-page posts because it’s not necessary.

Step 7: Excluded items.

This section allows you to exclude categories from your sitemap.

Used along with the noindex meta tag, this is a way of protecting categories that you want to keep private or restricted to selected viewers.

If you don’t want posts in a specific category to turn up in search results you can check the category here.

Likewise, if you want to protect specific posts list their IDs in the box at the bottom.

To increase the protection of posts you want to keep private you should also specify ‘noindex’ in the ‘Robots’ meta tag for each post or page you want to protect.

Also, if you first noindex a page you should also copy its page ID and paste it in to this field. That will avoid Google Search Console throwing up the error ‘Submitted page marked noindex’. I explained this further here.

Step 8: Change frequencies

The second item in the image above allows you to tell the robots how often specific pages are likely to change on your site.

The site I’ve taken these shots from is set up with a static page as the start (Home) page, so I’ve set the home page to a weekly update while my posts are set to daily update.

If your blog is set up as a blog – i.e. where your home page reflects your most recent posts – then you should set the home page and the posts update frequency to the same.

For the rest you can see the frequencies I’ve selected – you’re welcome to use the same or vary them depending on how you operate your blog.

Step 9: Priorities

This is the section I referred to earlier – it’s where you can set your priorities if you choose not to use automatic prioritisation.

In this section I’ve set the highest priority to both posts and pages. As I mentioned earlier I optimise those every time I publish a new one, so giving them a higher priority here helps to make the most of that optimisation work.

My Home page in this image is set at a slightly lower priority than my posts and pages because of the way I’ve set up this site, using a static page as the start page.

On my other WordPress site, which is set up as a traditional blog, I’ve set my home page at the highest priority. This is because the Home page will change every time I write a new post.

For the rest of the elements you can see that I’ve set tags and category pages much lower and archives lower still.

These are all just other ways of looking at the same data on your site and, having set high priorities for pages and posts and not excluded any elements from the sitemap, I’ve got everything covered in the most efficient way possible.

OK, so that’s how I set up my Google XML Sitemap Generator Plugin. How do you set yours up? Leave a comment and let us know.

Martin Malden

Martin Malden
Owner – WealthyDragon

Website owner: Martin has been working online since 2006 and focuses on two areas: 1) affiliate marketing and 2) designing and building websites based on WordPress. He has his own WordPress agency, and serves clients in Hong Kong, Australia and the UK.