Skip to content Skip to navigation

Everything You Need to Know About WP Sitemaps

Author Benjamin Denis
|
Posted on
Everything You Need to Know About WP Sitemaps

Are you looking to create a sitemap for your WordPress site? If so, you’re on the right track. Creating a site map is essential for website SEO because it gives Google and other search engines a list of your website’s public URLs. These make it easier for its algorithms to crawl your site and index your pages. Ultimately, a decent sitemap could improve your ranking in SERPs.

WordPress creates sitemaps for you by default, but it is limited. That’s why many users seek out alternative plugins with more comprehensive features.

This article is a complete guide to WordPress sitemaps. We’ll show you how to create a sitemap using a class-leading plugin called SEOPress PRO and how to submit your sitemap to Google. We’ll also answer plenty of common questions about sitemaps and how to manage them effectively. Read on to learn more.

What is a WP Sitemap?

It’s important to know that there are two types of sitemaps found on standard websites. Both list your URLs. However, they serve different purposes.

XML sitemaps are specifically for search engine bots to crawl and aren’t visible to website visitors. Website owners write these in a way to appeal to search engine algorithms. Google, Bing, and other services crawl XML and use it to understand the relationship between your pages and their relative hierarchies.

Google XML sitemaps tell the search engine which pages to list on search results. Most site owners want their homepage to appear for most search terms, though it often depends on the website. For example, eCommerce businesses selling specific products might prioritize product pages to appear instead. Bear in mind that an XML sitemap is an exploration aid and cannot by itself determine what pages will be indexed by search engine crawlers.

HTML sitemaps are the ones intended for your human audience. It’s a tool they can use to navigate your site and find pages quickly. This article primarily covers XML sitemaps – the one that counts most for search engine optimization.

Note that XML and HTML sitemaps are not the same as robots.txt files. Robots.txt files tell search engines which pages to crawl and which to omit, whereas sitemaps provide a page structure, giving Google more information on which to prioritize in SERPs.

How to Create a WP Sitemap

Technically speaking, you don’t need to do anything to create a WordPress sitemap. WordPress 5.5 and onwards constructs XML sitemaps for all websites automatically every time you add a new page or blog.

You can view your sitemap by adding the suffix “wp-sitemap.xml” to your website URL. Therefore, the format to use is https://www.example.com/wp-sitemap.xml.

However, the default sitemaps generated by WordPress are limited and don’t give search engines much context about your website URLs. By creating more powerful and informative XML sitemaps, it will be much easier for search engine crawlers to analyze your website, index your pages, and associate them with primary keywords.

That’s why many WordPress users replace their default sitemaps using third-party SEO plugins, which offer features and customization options that you wouldn’t otherwise have access to. One such plugin is SEOPress, an SEO plugin that includes several features that give you a better SEO workflow.

SEOPress comes in two plans: SEOPress Free, which improves on WordPress’s default platform and lets you create custom XML and HTML sitemaps; and SEOPress PRO, which adds more features, such as the ability to add videos to sitemaps and create Google News sitemaps.

SEOPress Free and SEOPress PRO automatically disable the native WordPress XML sitemap to avoid WordPress SEO conflicts, so you don’t need to do it manually.

SEOPress Free

Here are some of the main ways that you can use SEOPress Free to create sitemaps that are superior to the native WordPress sitemap:

Add custom post types to sitemaps

SEOPress Free lets you include custom post types such as posts, pages, and WooCommerce products, as well as custom post types and custom taxonomies. You can add titles, meta descriptions, and custom meta robots from the options menu. The following are some examples of where such features could come in handy:

  • An eLearning site looking to index its category pages to provide Google with more context about the courses or learning streams it offers
  • A digital marketing site wanting to provide Google with more information about the structure of its services, such as SEO, PPC, content marketing, etc.
  • A confectioner indexing individual product pages based on keywords, such as “salted caramel” or “nougat center”
  • A consulting business wanting to provide client category-specific content on its web pages

Don’t worry if a URL is not present in the sitemap. Google uses other methods, including following links on your pages, to discover your site’s structure and index pages.

Mark posts as noindex automatically

Selecting which post types to include and exclude from your sitemap
Selecting which post types to include and exclude from your sitemap

SEOPress also lets you mark posts and post types as noindex to exclude them from your sitemap automatically. For example, we generally recommend that you exclude tags from your WordPress sitemap. Let’s say you have a blog post about your trip to Dubai, and you use the tags ‘Dubai’ and ‘travel’. By leaving tags in your sitemap, search engine crawlers may scan duplicate content, which can affect your website’s indexing process.

Add images to your XML sitemap

You can also use SEOPress to add images to your XML sitemap and improve visibility in Google Images. The sitemap plugin permits standard images, galleries, feature images, and WooCommerce product images.

To apply, go to SEO > XML – HTML Sitemap > Enable XML Image Sitemap > Save changes. Then view XML sitemaps by clicking View your sitemap on the XML sitemap page. Images in sitemaps are visible only by viewing the source code.

Enable an XML image sitemap in the SEOPress dashboard
Enable an XML image sitemap in the SEOPress dashboard

Including images in your site maps makes good business sense. Imagine you sell women’s shoes. Ideally, you’d like a picture of a desirable pair of shoes to accompany your webpage in Google Image results. This way, users are more likely to click on your pages. Adding images to your XML sitemap allows this.

Alternatively, imagine you sell stock photos online. Having your images and associated pages show up for relevant keywords encourages more users to click through. Again, adding images to XML sitemaps following Google’s instructions makes this possible.

SEOPress PRO

Here’s how you can take your sitemaps to the next level with SEOPress PRO:

Add videos to sitemaps

SEOPress PRO lets you add videos to your sitemaps, regardless of whether you host those videos on your site. For video XML sitemaps, the plugin automatically adds any YouTube videos for new posts, and the user can regenerate it from SEO >Tools > Video Sitemap tab. For other videos, such as Vimeo or self-hosted videos, the user can manually add them from the SEO Metabox > Video sitemap tab.

Adding video sitemaps is helpful because it provides Google with extra information it can use to understand videos on your pages. It also helps search engines find new videos they wouldn’t otherwise discover via conventional crawling.

Add your posts to Google News

Enabling a Google News sitemap with SEOPress PRO
Enabling a Google News sitemap with SEOPress PRO

SEOPress PRO lets you create dedicated sitemaps to submit to Google News, which lets Google discover your news posts faster and increases the chances of indexing them. Note that you should keep Google News sitemaps updated and only include URLs that are up to two days old.

Using the plugin, you can list your articles’ authors in a dedicated sitemap, including members from BuddyBoss/BuddyPress, provided you integrate your site with it.

This feature is popular because it helps you to develop domain authority. For instance, adding the names of professional academics featured in your blogs and indexing the author archives could encourage Google to view your site as more trustworthy and relevant.

No need to update manually

SEOPress also cuts down on manual administration. The tool enables sitemaps per your preferences, meaning you don’t need to update them by hand. The software will do it for you, including new pages or posts without further work.

You can access sitemaps in WP by going to SEO > XML – HTML Sitemap. You can then view sitemaps constructed with the SEOPress PRO plugin once you install it.

XML sitemaps from SEOPress look like this:

An example of an XML sitemap made with SEOPress
An example of an XML sitemap made with SEOPress

Want to learn more about how to use SEOPress to create sitemaps for your WordPress website? Check out our guides on how to create an XML sitemap, how to create an XML image sitemap, and how to create an HTML sitemap. Additionally, you can check out our instructional video below:

The Benefits of Using a WordPress Sitemap

A sitemap will not automatically make you rank well. However, it will optimize your website for SEO. A sitemap makes it easier for search engine bots to crawl your website, resulting in faster crawls.

It’s easier to ask Google to prioritize crawling certain pages for your site, as you can add metadata to your most important pages. If you use rich media content like videos and images, Google considers this for search purposes. For example, it might be easier for your feature images to appear as results in Google Images.

Having a sitemap helps alert search engine crawlers about new content on your website and pages they haven’t indexed before. SEOPress Free pings Google in two ways. The first is a scheduled task (WP CRON) which automatically pings Google daily, and the second is manual, letting you ping Google directly through the plugin, telling them your sitemap has changed.

While SEOPress Free helps create a sitemap and speed up indexing, it also has an instant indexing feature that makes the process even faster. You’re allowed 10,000 queries per day at no cost for Bing / Yandex (IndexNow) and 200 queries per day with Indexing API (Google). This significantly increases the possibility that Google will index your URLs in just a few hours instead of the usual days or weeks.

How to Submit Your Sitemap to Google

Once your sitemap is set up, you’ll want to submit it to Google. While there is a chance that Google will find your sitemap without this step, it’s not a guarantee. Submitting your sitemap ensures that it is visible to Google’s search engine crawlers, and while it’s not possible to know when Google will crawl your sitemap, this step can reduce the time down by weeks.

The best way to submit your sitemap, especially if you’re doing it for the first time, is to use Google Search Console via the Sitemaps report. Here’s an official guide by Google on how to submit a sitemap, but the basic steps are here:

  1. Sign into Google Search Console
  2. Select your website on the sidebar named “search property”
  3. Click on Sitemaps in the Index menu
  4. Remove any outdated or invalid site maps if you have them
  5. Enter the “sitemaps.xml” in the Add a new sitemap field and click Submit

Common Issues When Creating a WP Sitemap

Even when using an SEO plugin like SEOPress, you may run into some issues with your sitemaps. Luckily, it’s straightforward enough to get these sorted. SEOPress have a guide to common sitemap issues and how to solve them, and we’ll look at the top five below. If you have an issue that you can’t solve by yourself, then you can open a support ticket with SEOPress, and they will help you directly.

404 Error

If your sitemap returns a 404 error, it means the sitemap index or individual sitemap doesn’t exist (or Google cannot locate sitemaps.xml). To resolve this issue, flush your permalinks from Settings, Permalinks.

Cached XML sitemaps

Google Search Console may tell you that “your file appears to be an HTML page.” If you get this error, exclude XML files from your caching plugin and content delivery network (CDN). Moreover, update your plugin to the latest release to rule out compatibility issues.

Blank XML sitemap

If your XML sitemap is blank, it could be an issue with the XSL stylesheet associated with it. Check it by accessing the source code at https://example.com/sitemaps_xsl.xsl.
You can also try enabling the WP Debug feature to find the error. Enabling this option and re-loading your sitemap should show any errors in the debug.log file.

Missing URL in the sitemap

A missing sitemap URL could indicate a noindex page. Correct this error by removing the page’s noindex status.

Slow sitemap

Lastly, you can speed up your sitemap by disabling image sitemaps in SEOPress.

Tips for Further Optimizing Your WP Sitemap

While SEOPress will make the process of creating sitemaps a lot easier, there are still some best practices that you should follow. Google provides lots of documentation on how to optimize your sitemaps, and in this section, we’re sharing some top tips with you:

  • Make your URLs consistent and fully qualified. That’s because Google only crawls URLs as listed. (When adding your domain URL https://www.example.com/, avoid specifying it with missing “www” or as a relative URL such as “./mypage.html”.
  • Avoid using user-dependent identifiers and session IDs in your sitemap. Google must manually process these, increasing the risk of duplicate crawling. Only include the root URL.
  • If you use other language versions in your URL, tell Google with “hreflang” annotations.
  • Only encode sitemap files using UTF-8 and use escaped URLs appropriately.
  • Only list canonical URLs in your sitemaps. Only list the URL you prefer if you have multiple page versions by adding the rel=canonical marker or redirects. (Note you enter a custom canonical (and NOT equal to a post permalink) from SEOPress metabox > Advanced tab when a user edits/creates a post on the settings page, automatically excluding it from the XML sitemaps.)
  • Only point to one version of a page in a sitemap if you have different URLs for mobile and desktop versions of a page. (You can annotate URLs with both mobile and desktop versions if you still want to point to both URLs).

Create Your WordPress Sitemap with SEOPress!

The benefits of adding a sitemap to your WordPress website are considerable. XML sitemaps let you provide Google and other search engines with more information about your sites, making it easier for them to assess your site’s structure.

WordPress’s in-build XML feature isn’t particularly advanced. That’s why website owners should use SEOPress. It’s currently the best plugin on the market for creating both XML and HTML on the platform, offering the ability to add images, galleries, and WooCommerce product pages.

SEOPress PRO offers additional sitemap functionality, including the ability to appear in Google News and add videos. Try SEOPress PRO today and see how it can improve your site’s visibility and indexing.

By Benjamin Denis

CEO of SEOPress. 15 years of experience with WordPress. Founder of WP Admin UI & WP Cloudy plugins. Co-organizer of WordCamp Biarritz 2023 & WP BootCamp. WordPress Core Contributor.