Understanding and Optimizing Your XML Sitemap to Boost SEO

In a crowded sea of websites competing for attention, an XML Sitemap can be a beacon for search engines to find and understand your content. You probably create a sitemap for your clients when you build a new website, but are you getting the most out of this easily overlooked resource? Let’s dive in to an examination of the elements of an XML Sitemap and the best practices to optimize it for search engine success.

The Basics: What is an XML Sitemap?

At it’s most basic level, an XML Sitemap is a list of all the various pieces of content on your site. It will absolutely be one of the least attractive pages on your site, but that is totally fine, because it is created for search engines, not humans. (You can additionally create an HTML Sitemap for humans, but that’s a different topic.) When optimized properly, an XML Sitemap serves as a structured outline of your website’s content and how the various pieces connect to one another. When Google understands the structure and content of a site, this makes it easier for him (her?) to serve up relevant content in SERPs.

Note: Including or excluding a page on your sitemap has no impact on whether or not it is indexed by search engines. If a page is excluded from the sitemap, it can still turn up in search results. If you do NOT want a page to be found, be sure to mark it as “noindex”. This can be done manually, but more commonly via an SEO plugin.

Fun fact: Since version 5.5, WordPress automatically creates an XML Sitemap and updates it with each piece of content published. This is nice and all, but these are very basic sitemaps. Most of us will want something a little more robust. Fortunately, all of the common SEO WordPress plugins offer this function, with varying customization options.

Most of us will use a WordPress SEO plugin such as All In One SEO, Yoast, Rank Math, or SEOPress to generate sitemaps. But we are Geeks! We like to know how things work. There are an abundance of detailed tutorials and syntax guides available from plugin providers, SEO websites, and even the search engines themselves, so we won’t get too caught up in the nitty gritty details. But by the end of this article you will know exactly what to search for to meet your specific needs.

Let’s dive in!

Essential Elements of an XML Sitemap

List of Indexed Content

Every page that you would be like to show up in a search should have a place in the XML Sitemap. This includes:

  • Content Pages
  • Product Pages
  • Category Pages
  • Blog Posts
  • Images & Videos

What NOT to Include

Noindex Pages

Not every page should turn up in searches. For example, delivery pages for lead magnets or thank you pages for newsletter signups most likely don’t belong on the list.  Keep those backstage pages out of the XML Sitemap and mark them with a “noindex” tag  to maintain focus on what truly matters.

Orphaned Pages

This is sort of a sneaky one. Basically, you shouldn’t have orphaned pages at all, so if they turn up on your XML Sitemap, it’s time to address it. Nearly every instance of an orphaned page, can be solved by one of the following steps:

  • Create a link to it from another (non-orphan) page
  • Mark it as noindex
  • 301 redirect it to updated page
  • Delete it if it isn’t providing any value to the site (set as 410 “permanently deleted”)

Non-canonical URLs

A non-canonical page is alternate or duplicate version of another page which has been chosen as the primary source. This is pretty obvious with very similar or actual duplicate pages on a site, but gets tricky when you have one single page of content that has multiple variations of its link out in the wild.

Some examples of a single page with canonical issues:
  • URL with Parameters: If you use parameters to track traffic, be careful to not include the variables in the urls. (example: website.com/xml-sitemaps?source=email vs website.com/xml-sitemaps)
  • www or nah: If you haven’t specified whether or not to use www in your url, it’s possible that your site loads (without redirecting) both with and without prefacing it with www. This is bad because it essentially creates duplicates of every single page of your website in the eyes of search engines.
  • URL with Trailing Slash: This might be the most insidious of the bunch. Those trailing slashes can creep in easily!  (example: website.com/xml-sitemaps/ vs website.com/xml-sitemaps)

Anchor Links

Whether you call them Anchor Tags, Anchor Links, or Jump Links, these are the urls with a # that link to a different spot on the same page. The most common use is probably a “Back to Top” link, but they can also be useful to help visitors navigate long or text-heavy pages. Whatever your use case, they don’t belong on your sitemap.

Media Attachment Pages (maybe)

As you are probably aware, WordPress has a default content type called Media Attachments for the express purpose of displaying in image on its own, but with a bit of additional info. The images used on your site should appear on the sitemap in relation to the page on which they appear, so it is unnecessary to include the Attachment Page in the list. An exception to this might be a photography website where the theme includes relevant details about the image that would be of interest to visitors, such as the EXIF data of a photo. In this case, the theme would most likely be using the Attachment content type to display the details. In a case like this, you may choose to include the Media Attachment on the sitemap.

Additional Data to Include

Last Modified Date

The Last Modified Date in your XML Sitemap acts as a timestamp, telling search engines when a page was (surprise, surprise) last modified. The actual value of including this tag is up for debate. It won’t hurt, but likely isn’t worth the effort.

Priority Tags

Priority tags let you communicate to search engines which pages are the VIPs of your website. The surprisingly tiny rage goes from 0.0 to 1.0. Your homepage, landing pages, and products would warrant the top numbers, while blog posts, about page, and other informational pages will be in the 0.4-0.7 range. Below that, you’ll find old news or outdated info that has enough relevance to save it from deletion.

Frequency Tags

How often does your content hit the dance floor of updates? Frequency tags (options include always, hourly, daily, weekly, monthly, yearly, and never) help search engines understand the rhythm of your content updates. It theoretically guides their crawling schedule and ensures they revisit when it matters most. Common opinion seems to be that this tag has little to no effect on actual crawl frequency or ranking. That said, Google loves when you use their tools and give them all the data, so you may find it beneficial.

Beyond the Basics: Additional Elements for Supercharged XML Sitemaps

Image and Video URLs

Including images and videos in your XML Sitemap enhances visibility in image and video searches. Yes, that is one way to potentially get images to show up in searches with the “images” filter selected. Images are not listed individually, but show up within the link for the page where it is displayed. If a sitemap is a formatted list, you will not see the images referenced unless you view source.

Hreflang Tags (for Multilingual Sites)

If your site speaks multiple languages or caters to various regions, Hreflang tags are your duplicate content busters. Plus they guide search engines in serving the right content to the right audience.

Mobile URLs (for Mobile Versions)

You aren’t using mobile links, right? Right?? This antiquated predecessor to responsive design still turns up from time to time. If you find your self working on a site with “m(dot)” urls, you have a couple decisions to make. Google prefers that you just use one link to any one piece of content. However, if you feel it’s important to list both mobile and desktop versions of a page, be sure to tag the mobile version appropriately.

News Sitemap (for News Content)

If your site publishes regular news stories, you should absolutely take advantage of the custom options available for this type of content. You can tag news pages on your primary XML Sitemap, or create a separate “News Sitemap” to ensure your latest articles grab the headlines on search engines.

XML Sitemap Index (for Large Sites)

For websites with a ton of content, a Sitemap Index acts as the master guide, organizing sub-sitemaps efficiently. This is primarily a tool for managing the complexity of very large sites, but there aren’t hard and fast rules about who can or can’t use a Sitemap Index. The only mandatory situation is if your site exceeds the maximum 50,000 page limit for any one sitemap.

Mastering a Piece of the SEO Puzzle

In the 100,000 piece jigsaw puzzle that is Search Engine Optimization, your XML Sitemap might not be a corner piece, but it is definitely an edge. This humble and often overlooked document is a strategic asset that has the potential to elevate your website’s visibility in the eyes of search engines. 

 

Don’t want to deal with the hassle?

If this seems too complicated, or you just don’t have the time, we’ve got you covered!

Your FocusWP Dev Team will create an XML Sitemap for your or your client’s site and submit it to the search engines – in less than an hour. 

(It may take a bit longer if you don’t have an SEO plugin or aren’t connected to Google Search Console.)

About the Author

Stephanie is a geek, entrepreneur, business coach, podcast host, internationally known speaker, notebook hoarder, and dad joke aficionado. She loves helping WordPress businesses thrive and grow.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Related Posts

WordCamp US 2023 FocusWP Meetup

WordCamp US 2023 FocusWP Meetup

Are you attending WordCamp US in August 2023? If you scored a ticket, then I'll be seeing you there! We are hosting a casual meetup for any FocusWP friends who will be in Washington DC for the conference. Details are still being worked out. If you are interested in...

See our site in 3D!

Subscribe to our newsletter and we’ll send you a pair of FocusWP 3D glasses!

Join our free, private Facebook group to network with like minded business owners and pick up tons of useful tips and resources.

Get Focused

Jump on our email list to get weekly tips for getting the most out of your FocusWP team, including task inspo, sample ticket briefs, pricing suggestions, and even email swipe files to help you effortlessly sell to your clients.

We will also occasionally share cool tools we are obsessed with, educational resources, and useful tips to help you run a profitable digital business. 

We'll do our best to send emails at times convenient for you.
This field is for validation purposes and should be left unchanged.