As an experienced website owner, you may have heard about XML sitemaps but wondered what exactly they are and whether you really need one.
In this comprehensive guide, I‘ll explain everything you need to know as a WordPress site owner about getting the most out of XML sitemaps.
Contents
- What is an XML Sitemap?
- Why are XML Sitemaps Important?
- Option 1: Using an SEO Plugin
- Option 2: Dedicated Sitemap Plugin
- Option 3: Manually Create an XML Sitemap
- Option 4: Use WordPress‘ Automatic Sitemap
- Submit to Google Search Console
- Submit to Bing Webmaster Tools
- Submit to Other Search Engines
- Monitor sitemap stats
- Re-submit sitemap regularly
- Update sitemap frequency
- List important external pages
- Create supplementary sitemaps
- Adjust page priorities
- Diagnose issues proactively
- Consider splitting into multiple sitemaps
- Do sitemaps help with rankings?
- What‘s the ideal sitemap size?
- Can I submit multiple sitemaps?
- Should I include images?
- How often should I update my sitemap?
What is an XML Sitemap?
An XML sitemap is a file that provides search engines like Google and Bing with a list of all the pages on your website.
Structurally, it‘s an XML-formatted file that contains information about each URL, such as:
- Last modified date
- Update frequency
- Page importance
- Page versions and alternate languages
Here‘s an example of what the XML code looks like:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/page1</loc>
<lastmod>2021-01-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
This sitemap file needs to be hosted on your web server, usually with the name sitemap.xml or sitemap_index.xml.
The purpose of an XML sitemap is to provide search engines with detailed information about your website structure that helps them crawl it more efficiently.
Think of it like a roadmap for search bots.
Why are XML Sitemaps Important?
There are a few key reasons why XML sitemaps are so valuable:
1. Improves index coverage
Having an XML sitemap improves a search engine‘s coverage of your website. This means more of your pages get discovered, crawled, and added to their index.
Without a sitemap, search crawlers have to explore link by link to find all your pages. But many sites have isolated pages that get missed this way.
By providing a sitemap, you guarantee search engines can find all your content.
Studies show sitemaps increase a site‘s pages indexed by search engines by an average of 25-50%.
2. Alerts engines to new content
When you add fresh content, a sitemap lets search bots know about the new pages right away. This prevents long delays before new content gets indexed.
3. Communicates priority
The sitemap allows you to indicate which pages are most important using the <priority>
tag.
This provides search engines guidance on which pages to crawl first during each pass.
4. Speeds up crawling
By using your sitemap, search engines don‘t have to rely on crawling link by link as much. This allows them to increase crawl frequency, getting your pages indexed faster.
5. Safeguards traffic during migrations
When you launch a redesign, switch domains, or move to HTTPS, a sitemap helps search bots adapt so you don‘t lose rankings during the transition.
As you can see, XML sitemaps are invaluable for improving SEO by facilitating better crawling and indexing.
Now that you understand the value of XML sitemaps, let‘s go through your various options for generating one for your WordPress site.
Option 1: Using an SEO Plugin
The easiest way to add an XML sitemap is by using a WordPress SEO plugin like Yoast SEO or All in One SEO.
These plugins offer full sitemap generation and configuration features with a few clicks:
Yoast SEO
-
Install and activate Yoast SEO
-
Go to SEO → Dashboard
-
Navigate to Features and enable XML Sitemaps
-
Save changes
-
Access your sitemap at www.yourdomain.com/sitemap_index.xml
All in One SEO
-
Install and activate All in One SEO
-
Go to All in One SEO → Sitemap
-
Check the box for "Enable XML Sitemap"
-
Save Changes
-
Access your sitemap at www.yourdomain.com/sitemap.xml
The benefit of using a plugin like Yoast or AIOSEO is that sitemap generation and management is handled automatically. They also provide more configuration options versus other methods.
Option 2: Dedicated Sitemap Plugin
If you don‘t already use an SEO plugin, another option is a dedicated sitemap generator plugin like:
These plugins are lightweight and made specifically for XML sitemap creation.
The downside is they include fewer configuration options compared to plugins like Yoast SEO. But the simplicity can be appealing.
Option 3: Manually Create an XML Sitemap
If you‘re comfortable writing XML, you can manually create an XML sitemap by:
-
Creating a new sitemap.xml file in a code editor
-
Adding
<url>
tags for each page you want to include -
Including additional tags like
<lastmod>
,<priority>
, etc. -
Uploading the sitemap.xml file to your root web directory
The advantage here is complete control over the sitemap content and code. But the tradeoff is manually updating the file when your site content changes.
Option 4: Use WordPress‘ Automatic Sitemap
Since WordPress 5.5, an XML sitemap is auto-generated at www.yourdomain.com/wp-sitemap.xml.
However, this default WordPress sitemap is very basic and lacks important data like priorities and change frequencies.
I recommend sticking with a dedicated plugin for maximum SEO benefit. The automatic sitemap should only be used as a last resort.
Once you generate your XML sitemap using one of the above methods, you need to submit it to search engines like Google and Bing.
Here is the process for getting your sitemap indexed:
Submit to Google Search Console
-
Sign up for Google Search Console
-
Add your site
-
Click Sitemaps in the left sidebar
-
Click Add a new sitemap
-
Enter your full sitemap URL
-
Click Submit
Google will now reference your sitemap when crawling your site.
Submit to Bing Webmaster Tools
-
Create a Bing Webmaster Tools account
-
Add and verify your website
-
Click on the Sitemaps tab
-
Paste your sitemap URL into the text box
-
Click Submit
Submit to Other Search Engines
For other search engines like DuckDuckGo, Yandex, etc:
-
Search for the engine name + "webmaster tools"
-
Follow their steps to add your site
-
Look for a sitemap submission option and enter your URL
-
Verify they received your sitemap
Now the major search engines will be able to discover your sitemap and utilize it when crawling your site.
Here are some top tips for maintaining your WordPress sitemap over time:
Monitor sitemap stats
Log in periodically to your Google and Bing webmaster console to view sitemap crawl stats. Watch for excluded pages, errors, or low indexing percentages.
Re-submit sitemap regularly
Be sure to re-submit your sitemap URL every few weeks in case search engines didn‘t save it properly.
Update sitemap frequency
Adjust the <changefreq>
values per page based on how often each page‘s content actually changes. Don‘t just leave it at defaults.
List important external pages
If you have vital pages outside your WordPress site, add them to your sitemap by manually entering their URLs.
Create supplementary sitemaps
Leverage options for video, news, and mobile sitemaps in your SEO plugin for enhanced indexing.
Adjust page priorities
Update page priority scores regularly based on which pages you want search bots to focus on crawling first.
Diagnose issues proactively
Monitor crawl errors in search console to identify and fix problems preventing pages from being indexed.
Consider splitting into multiple sitemaps
If your sitemap grows very large, split it into a sitemap index and smaller sitemaps of 50,000 URLs each.
Here are answers to some commonly asked questions about XML sitemaps:
Do sitemaps help with rankings?
Sitemaps don‘t directly influence search rankings, but they can indirectly boost rankings over time by improving index coverage and traffic from search engines.
What‘s the ideal sitemap size?
There‘s no specific size limit. But gigantic sitemaps over 50,000 URLs may slow crawling. Split into smaller sitemaps if it‘s over 100,000 URLs.
Can I submit multiple sitemaps?
Yes, absolutely. There‘s no limit to how many sitemap files you can provide search engines.
Should I include images?
No, only include URLs of webpages in your XML sitemap. Search engines don‘t use sitemaps for images.
How often should I update my sitemap?
Ideally, resubmit your sitemap whenever the content changes. But at minimum re-upload your sitemap monthly or weekly depending on your content update frequency.
As you can see, implementing and managing an XML sitemap is one of the best things you can do as a WordPress site owner to improve SEO.
Sitemaps facilitate much more efficient crawling of your content by search engines leading to better index coverage and more organic search traffic.
I recommend leveraging the built-in sitemap functionality that comes with popular WordPress SEO plugins like Yoast SEO and All in One SEO Pack for optimal results.
Be diligent about monitoring your sitemap‘s indexing status within Google and Bing webmaster tools. Diagnose and resolve any errors that crop up.
Optimizing your sitemap and keeping it updated should be a key piece of your overall SEO strategy.
Let me know in the comments if you have any other sitemap questions!