Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
30 Million+
Websites using our plugins
20+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Create a Sitemap in WordPress (Ultimate Guide)

Ever published a new blog post, only to find it’s nowhere on Google days later? That usually happens because search engines haven’t discovered your content yet. A sitemap fixes exactly that.

The good news is that creating a sitemap in WordPress is easy. You can use the built-in sitemap WordPress generates automatically, or get a more powerful version from an SEO plugin.

In this guide, we’ll walk you through both options and show you how to submit your sitemap to search engines without touching any code.

How to create a sitemap in WordPress

What Is a WordPress Sitemap?

A WordPress sitemap is a file that lists all pages, posts, and other content on your site, so search engines can discover and index everything more efficiently.

There are a few different types of sitemaps in WordPress:

  • XML sitemap: The most common type, built for search engines like Google and Bing rather than human visitors. WordPress has this built-in.
  • HTML sitemap: A clickable page that helps visitors (and search engines) navigate your content.
  • RSS/Atom sitemap: A feed that highlights your most recently published or updated posts.
  • Image sitemap: Helps search engines find and index the images on your site.
  • Video sitemap: Helps your video content appear in video search results.
  • News sitemap: For news publishers who want their articles indexed quickly in Google News.
  • Multilingual sitemap: Points search engines to the right language version of a page for each region.

Most beginners only need an XML sitemap to get started. The other types become more useful as your site grows or if you publish specific content like videos or news articles.

How to Create a Sitemap in WordPress

WordPress comes with a basic sitemap built in, so you don’t need a plugin to get started. It was added in WordPress 5.5, and it works automatically without any setup on your part.

To find your default WordPress sitemap, simply add /wp-sitemap.xml to the end of your website’s URL.

For example, if your site is https://www.example.com, your sitemap will be at https://www.example.com/wp-sitemap.xml.

When you visit that URL, you’ll see a sitemap index file that links out to separate sitemaps for your posts, pages, categories, tags, and other content types.

WordPress' default sitemap

The built-in sitemap covers the basics. As your site grows, though, you may run into a few limits:

  • No image or video sitemap support. Media content won’t be included, which means search engines may miss it.
  • No news sitemap. If you run a news site, the default sitemap won’t meet Google News requirements.
  • No HTML sitemap. There’s no visitor-friendly version of your sitemap built in.
  • Limited control over what’s included. You can’t easily exclude specific pages, posts, or content types without writing custom code.
  • No Google Search Console integration. You’ll need to manually submit the sitemap URL yourself with no guidance from within WordPress.

This is why we recommend most website owners to use an SEO plugin and generate a more advanced sitemap. Here’s how to set one up:

How to Setup an Advanced WordPress Sitemap

An SEO plugin gives you a more advanced XML sitemap than the default WordPress sitemap. You control exactly what’s included, such as post types and the number of included links.

You don’t need a paid plugin to get started. Almost every popular WordPress SEO plugin generates an XML sitemap in their free version. We’ll show you how to use All in One SEO (AIOSEO) because it’s what we use at WPBeginner.

Go ahead and install and activate the free AIOSEO plugin.

Alternatively, you can install the free Yoast or Rank Math plugin. If you need help, see our step-by-step guide on how to install a WordPress plugin. It runs a quick setup wizard the first time, and the defaults are fine to get going.

Head to All in One SEO » Sitemaps and make sure you’re in the ‘General Sitemap’ tab. You should see the ‘Enable Sitemap’ toggle switched on. If it isn’t, turn it on now.

Enabling sitemap in AIOSEO

Scroll down to the ‘Sitemap Settings’ section. Under ‘Post Types,’ toggle on the content types you want indexed, such as posts, pages, and any custom post types.

Leave off anything that isn’t useful in search, like private or utility pages.

Choosing post types to include in sitemap

In the ‘Taxonomies’ section below, it makes sense to include your categories, while tags are optional. We also recommend leaving date-based archive and author pages turned off, since they tend to be thin content that can dilute your sitemap in Google’s eyes.

AIOSEO also adds your images to this XML sitemap automatically, so you don’t need a separate image sitemap. If you’d rather leave images out, you can turn it off under the sitemap’s Advanced Settings.

When you’re done, click ‘Save Changes.’ Your XML sitemap is now live, and you can view it anytime with the ‘Open Sitemap’ link at the top of the page.

Previewing AIOSEO's XML sitemap

Setup a Video Sitemap in WordPress

A video sitemap helps search engines find and understand the video content on your site. Without one, your videos may not appear in video search results or Google’s video carousel.

Important: Video Sitemap is available on AIOSEO’s Pro plan and above. If you’re on the free or Basic plan, then you can skip this step or upgrade to Pro if you need video indexing support.

To enable it, switch to the ‘Video Sitemap’ tab at the top of the page and toggle on ‘Enable Sitemap.’

Enabling video sitemap in AIOSEO

Now, you’ll see options to control which content is included:

  • Post Types. Select the post types that contain video content on your site. For most sites, this will be posts and pages, but you can also include custom post types if you host videos in a specific section of your site.
  • Taxonomies. You can choose whether to include taxonomy pages that feature video content as well.
Video sitemap settings

AIOSEO’s video sitemap works best with videos embedded from a supported host like YouTube or Vimeo. If yours are hosted elsewhere or hard for search engines to detect, you may need to add schema markup to help Google understand them.

Setup a News Sitemap in WordPress

A news sitemap is designed specifically for websites that publish news articles. It tells Google News about your latest content so it can be considered for inclusion in Google’s news search results and the Top Stories section.

A news sitemap only includes articles published within the last 48 hours. Google News is focused on fresh, timely content, so older articles won’t appear in this sitemap. Your regular XML sitemap handles the indexing of your older content.

To set up the News sitemap in AIOSEO, go to the ‘News Sitemap’ tab at the top of the page and turn on the ‘Enable Sitemap’ toggle.

Enabling news sitemap in AIOSEO

Then you can configure these settings:

  • Publication name. Enter the name of your news publication exactly as you want it to appear in Google News. This should match the name you used when registering your site with Google News.
  • Post Types. Select which post types contain your news articles. Most news sites will choose ‘Posts’, but if you use a custom post type for news content, you can select that here instead.
News sitemap's settings in AIOSEO

Note: If you run a news site, make sure it meets Google News’s content policies before submitting a news sitemap. Google has specific guidelines around original reporting, authorship, and publication frequency that your site will need to follow to be considered for Google News inclusion.

Setup an RSS Sitemap in WordPress

An RSS sitemap works differently from an XML sitemap. Instead of listing all your content at once, it focuses on your most recently published or updated posts from your RSS feed. That gives search engines a lightweight way to spot your newest content, although it won’t guarantee faster indexing.

To set it up, switch to the ‘RSS Sitemap’ tab at the top of the page in your AIOSEO settings. Click the ‘Enable Sitemap’ toggle to turn the RSS sitemap on if it isn’t already active.

Enabling RSS sitemap

Here, there are a couple of simple options to configure:

  • Number of posts. This setting controls how many of your most recent posts are listed in the RSS sitemap. AIOSEO sets a default number, but you can adjust it based on how frequently you publish new content.
  • Post Types. Choose which content types are included in your RSS sitemap. For most sites, you’ll want to include posts, but you can also add pages or custom post types.
RSS sitemap settings in AIOSEO

Setup an HTML Sitemap in WordPress

An HTML sitemap (sometimes called a visual sitemap) is a clickable page built for your visitors, not just search engines. It is handy on larger sites where content is hard to find through the menu.

To activate the HTML sitemap feature, go to the ‘HTML Sitemap’ tab at the top of the page and turn on the ‘Enable Sitemap’ toggle.

HTML Sitemap settings panel: sitemap is enabled; options shown include Dedicated Page (selected), Gutenberg Block, Shortcode, Widget, and PHP Code.

Once enabled, you’ll see several options to customize how your HTML sitemap looks and works:

  • Sitemap page. AIOSEO can automatically create a dedicated page for your HTML sitemap, or you can choose an existing page on your site to display it.
  • Post Types. Select which content types you want to appear in the sitemap, such as posts and pages.
  • Taxonomies. Choose whether to include categories, tags, or other taxonomy archives in the sitemap.
  • Sort order. Control how your content is organized in the sitemap, such as by publication date, title, or last modified date.
  • Compact archives. This option groups older content by month or year, which keeps the sitemap page from becoming too long on sites with a large archive.
HTML sitemap settings in AIOSEO

Setup a Multilingual Sitemap in WordPress

If your WordPress site publishes in more than one language, then a multilingual sitemap helps search engines serve the right version to each region’s audience.

Most of this is handled by your translation plugin, not your SEO plugin. Translation plugins like Universally, WPML, and Polylang, add the hreflang tags and organize your language versions.

AIOSEO, Yoast SEO, and Rank Math pick these up automatically, so your translated pages appear in your sitemap with nothing extra to configure.

Submit Your XML Sitemap to Search Engines

Search engines are quite good at finding a sitemap on their own, especially once your SEO plugin adds it to your site’s robots.txt file. However, we recommend that you submit the sitemap manually to ensure that search engines can find it.

First, let’s find your sitemap URL so you can submit it to Google or Bing. Go to All in One SEO » Sitemaps and click ‘Open Sitemap’ to view it.

Button to preview your XML sitemap

Keep this tab open so you can copy the URL in the next steps.

Or, you can access it directly by typing your website address followed by /sitemap.xml. For example: https://www.example.com/sitemap.xml.

Copying the sitemap URL

For Yoast SEO and Rank Math, it’s usually yoursite.com/sitemap_index.xml. You can confirm your exact sitemap URL by visiting the sitemap settings page in whichever plugin you’re using.

Submit Your Sitemap to Google

For Google, you will submit your sitemap from your Google Search Console account.

If you haven’t set up Google Search Console yet, then follow our guide on how to add your WordPress site to Google Search Console to create your account, verify ownership, and connect it to WordPress.

One detail to get right during setup: Google treats HTTP and HTTPS as different sites, and https://www.example.com is different from https://example.com. Use the exact URL from your WordPress Settings » General page in the ‘Site Address’ field.

Once Search Console is connected, go back to your Google Search Console dashboard and click ‘Sitemaps’ in the left menu.

Then, paste your sitemap URL into the ‘Add new sitemap’ section and click ‘Submit.’

Submitting sitemaps to Google Search Console

Google will now regularly check your sitemap to discover new and updated content on your site. We recommend checking back on this page after a day or two to make sure Google has processed your sitemap successfully.

You should see your sitemap listed with a status confirming Google has processed it. If it flags errors, click them for details (often just a formatting issue Google resolves on its own).

Back in the AIOSEO Sitemaps settings, you’ll also see a notification that says, “Your site is connected directly to Google Search Console and your sitemaps are in sync.”

Sitemaps connected to Google Search Console
Submit Your Sitemap to Bing

Just like Google, Bing has its own webmaster tool for submitting your sitemap. It’s worth doing too, since Bing also powers other search platforms like DuckDuckGo.

First, head over to Bing Webmaster Tools and sign in with a free Microsoft account. Then add your site and verify that you own it. For the full walkthrough, see our guide on how to add your website to Bing Webmaster Tools.

Once your site is verified, open your website property and click ‘Sitemaps’ in the left-hand menu.

Next, click the ‘Submit Sitemap’ button. This opens a popup where you can enter your full sitemap URL.

The Submit sitemap button in Bing Webmaster Tools

Paste your full sitemap URL, for example https://www.yoursite.com/sitemap.xml

Then, click ‘Submit’ to send it to Bing.

Adding the sitemap URL in Bing Webmaster Tools

Bing will process your sitemap and show the results in the ‘Sitemaps’ section, including how many URLs it discovered and whether there were any issues.

Frequently Asked Questions About WordPress Sitemaps

Do I need a sitemap if my WordPress site is small?

Yes, even small WordPress sites benefit from having a sitemap. While search engines can often find and crawl small sites through links alone, a sitemap makes sure that every page gets discovered, including newer content that hasn’t had time to build up internal links yet.

How often does my sitemap update?

Your sitemap updates automatically every time you publish, update, or delete content on your site. If you’re using an SEO plugin like AIOSEO, Yoast SEO, or Rank Math, then this happens in the background without you needing to do anything. Your sitemap will always reflect the current state of your site as long as your plugin is active and configured correctly.

Can I have more than one sitemap?

Yes, you can have multiple sitemaps on your WordPress site, and in most cases you will. A sitemap index file acts as a master list that points to separate sitemaps for different content types, for example, one sitemap for posts, one for pages, and one for videos.

Does having a sitemap guarantee my content will rank in Google?

No, having a sitemap does not guarantee your content will rank in Google. A sitemap helps search engines discover and index your content, but ranking depends on many other factors like content quality, backlinks, and overall site authority.

What should I do if Google shows errors in my sitemap?

If Google Search Console shows errors in your sitemap, start by clicking on the error to get more details about what’s causing it. Common fixes include:

  • Removing noindex pages from your sitemap
  • Updating or redirecting broken URLs that return 404 errors
  • Making sure your robots.txt file isn’t blocking pages that are listed in your sitemap

Once you’ve made your fixes, you can request Google to reprocess your sitemap directly from the Sitemaps page in Search Console.

Do I need to resubmit my sitemap every time I publish new content?

No, you don’t need to resubmit your sitemap every time you publish new content. Once you’ve submitted your sitemap to Google Search Console and Bing Webmaster Tools, both search engines will revisit it regularly on their own.

How to disable the default WordPress sitemap?

When popular plugins like AIOSEO, Yoast, or RankMath are active, they automatically switch off the default WordPress sitemap at /wp-sitemap.xml and generates their own advanced sitemap instead. So you won’t end up running two competing sitemaps.

We hope this article helped you learn about XML sitemaps and how to create an XML sitemap for your WordPress site. Next, you may also want to read our ultimate WordPress SEO guide or learn how to ask Google to recrawl URLs of your WordPress site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

274 CommentsLeave a Reply

  1. I remember the days when we made sitemaps manually using online tools or even by hand on our computers. Then came the revolutionary Yoast SEO, which did it for us, and we were thrilled. SEO plugins are truly genius in how they help with this. Now, I use AIO SEO. It’s great that the developers included this feature in the free version because it saves me time, and I don’t have to use another plugin for it. The combination of Google Console and a sitemap can significantly impact results. It’s a great way to get noticed, especially since you don’t have to know any XML programming.

  2. One thing is still unclear to me. AIO SEO generates the /sitemap.xml page, and here there are individual subpages like the sitemap for posts, pages, tags, etc. Is it enough to add the main sitemap to Google Search Console, and Google will go through everything on its own, or is it better to add each individual subpage, meaning each individual sitemap, to the console?

    • You would only want to add your main sitemap to search engines as that will normally let search engines know about the other sitemaps.

      Admin

      • Thanks for the response, now I finally have clarity. I didn’t want to overlook anything, so I was always adding all the sitemaps, which was evidently unnecessary. Search engines can handle it on their own. At least I’ll remember this for next time.

  3. This article is helpful to me.
    But I don’t normally create a site map manually, I heard search engines crawl WordPress sites automatically without a need to manually submit your sitemap.
    Am I right or wrong ??

    • Search engines can crawl your site without a sitemap but we recommend adding a sitemap as it helps tell search engines the content available to crawl on your site instead of waiting for search engines to find the content.

      Admin

    • Yes, the search engine crawls your site automatically, but my experience is that it does so faster with a sitemap. Let me explain why. When I create an article, AIO SEO automatically updates my sitemap.xml, which I also have added to Google Search Console. Thanks to the sitemap being updated both on the website and immediately afterward in Google Search Console, Google quickly receives the information that there is something new on the site. It will check it out and index it much faster. The same applies to editing an article. The update is also reflected in the sitemap, and Google will tend to review the modified content more quickly and possibly index any important information or updates in the article. In my opinion, having a sitemap.xml on your site and in Google Search Console is undoubtedly a necessity.

  4. thank you for the valuable helpful post
    I liked the video as it made it more easy and step by step, Actually when I find a video in the post, I feet comfortable that I will finish the issue
    I am using Yoast for site mapping and it is working fine with me
    Thank you

  5. Hi. I have a problem with my sitemap. I’m trying to add my sitemap to google search console and unfortunately I’m getting the error site cannot be added. After checking the url of the map, search console tells me the error: Is indexing allowed
    error
    No: The tag “noindex” was detected in the “X-Robots-Tag” http header.

    I tried to find this tag in many ways but I don’t see it anywhere.

    Please help me, best regards.

  6. I am a beginner, I have new sitemap and want to update new sitemap in AIOSEO Lite plugin but I couldn’t find option to update or add new or remove sitemap in the plugin, please guide me how to update sitemap in AIOSEO Lite plugin.

  7. Can I submit more than one sitemap? I have submitted a sitemap created by yoast seo and the one created by jetpack. Does this affect any?

    • We would recommend only submitting one sitemap and not using multiple plugins for creating sitemaps as that can cause issues.

      Admin

  8. When I submitted it to Google Search Console, it says “couldn’t fetched”.
    So what should I do now?

  9. I have shifted my website from blogger.com to wordpress. Do I need to resubmit xml sitemap in Google search console?

    • The plugin is generating your sitemap so you would want to keep the plugin active on your site.

      Admin

  10. Hello, thank you very much for the great information, your website is very helpful! I got a question about sitemap, I follow all the steps but in the end when I add the last part of your sitemap URL to ‘Add new sitemap’ section and click Submit, it doesn´t show me an amount of links, it shows that I have 0 links. What could be the problem?
    Thank you in advance)

    • You would want to visit the address on your site to check if there are any errors. You may also want to resave your permalinks for a common solution.

      Admin

  11. Hello admin thanks for this article, but I’m confused to an extent and here is my question; is there any negative effect of submitting both www and non www sitemap to webmasters?

    • It could cause some reporting issues, it is normally best to submit the sitemap with the URL you would like to have appear on Google’s search

      Admin

  12. I was Struggling to verify my sitemap in google before. Now i added It. Very Useful article. Thank you for Sharing.

  13. Very very useful post. I was struggling with the sitemap and its submission to Google Search Console. Now sorted. Thank you.

  14. I find this article very helpfull, but I want to ask you something. I use Yoast SEO, but now need to generate separate XML sitemap for images. Could you reccomend me a plugin for that. Thanks

    • Yoast currently has the option of including images in the sitemap so you shouldn’t need an additional plugin :)

      Admin

  15. Thanks so much for this it was a massive help! Because I verified and uploaded to Google Console first, I managed to verify and import my website/sitemap to Bing by just connecting my google account (Bing gives you an option for this when you click on sign up) – it was done in less than 30 seconds! I wouldn’t have thought to do Bing, so thank you so much for covering that too!

  16. This is honestly the most helpful article I’ve ever seen. I’m not a developer (just new home business owner trying to figure out the rabbit hole that is web dev) and this guided me through all the unknowns I’d had about importance of a sitemap, let alone how it would benefit my site. THANK YOU SO MUCH!

  17. I rarely write comments on articles but this was easily one of the most helpful I’ve ever read. Thank you!

  18. I have my site with only one post published, so is it necessary to submit a sitemap each time when I added a new Article/Post?
    And how often should I submit sitemap?

    • You only need to submit your sitemap once unless there is an error, it will update as you add posts.

      Admin

  19. Great article!
    Yt’s a pain that the Yoast plugin (as with all plugins) are only offered on the WP’s Business Plan. I’ve been on the Premium Plan and not allowed to install plugins.

    • Yoast has updated their interface so you should find it under SEO>General>Features at the moment.

      Admin

  20. Hello,

    Recently I added the sitemap for my website. But, while checked with the tool, it’s showing, no sitemap is added. Why it’s showing like this. I added Yoast SEO plugins.

    • It could be their caching or if your site has caching that you haven’t cleared it could be part of the issue.

      Admin

  21. Hi,
    I have a problem with sitemap submitting….I am using Yoast SEO when I submit a sitemap to google webmaster it says “couldn’t fetch”…….. but i have successfully submitted sitemap to bing and Yandex without any errors …what to do please help me

    • For an error like this, you may need to reach out to Yoast’s support to see their recommended troubleshooting for specifically Google not being able to crawl your sitemap.

      Admin

  22. I am really happy to get this article about sitemap.
    I am using Yoast SEO for sitemaps. Some SEO auditor is saying that I should improve it immediately. But Google search console is showing a green success and assuring that all is ok.

    Can you please suggest me what should I do right now?
    Thanks for the article..

    • We’re using the Yoast sitemap without any issues at the moment. If you would prefer what the auditor wants then you could certainly try that if you wanted.

      Admin

  23. I have Yoast SEO but XML sitemaps does not appear on the menu, which indeed looks very different from yours. Any suggestions as to how to find it?

  24. I need some help please,
    some pages on my website are not showing on sitemap.xml

    I entered it manually to google console, It showed an error that the sitemap format is HTML and that I should change the format

    how do I change sitemap format, please?

    • If you’re using a caching plugin you may want to try to disable it to see if it could be a conflict between Yoast and the caching plugin you’re using.

      Admin

  25. Hi, awesome tutorial, I did same as your instruction and working fine. But there’s a problem with this, check out the details.

    my website is yahoonewsz.com and when I type “www.example.com/sitemap_index.xml”, it works fine but it says page not found when typed “example.com/sitemap_index.xml”.

    Why?

    • You may want to check with your hosting provider that there is not a setting preventing the non www version from redirecting properly

      Admin

  26. Thanks for your best tutorial!

    I recently have a wordpress blog and have created xml sitemap using yoast seo, according to this tutorial in previous month. Yesterday I happend to see my xmlsitemap file at my wp-admin. There are only 5-6 lines which covers my new posts only. What about my old posts? Is there any problem? And how come I know that there is any problem? Because I have more than dozen posts till now.

    Kindly let me know.

    Arun Dixit

    • You may want to clear your caching and reach out to Yoast if your sitemap is refusing to update your older posts if you’re not excluding them.

      Admin

  27. I am using All in One SEO pack Plugin. If I download Yoast’s WordPress SEO plugin should I use both?

    • No, we would not recommend having multiple SEO plugins active as they can conflict with each other.

      Admin

  28. THANKS FOR SHARING THIS INFORMATION!
    one thing I want to know is that whether after every single update in pages, posts or change within a post, we need to submit the sitemap???
    Looking forward to hearing from you.

    • You should not need to resubmit your sitemap as long as Google does not run into any errors with your sitemap and with the method from our article it should over time update your sitemap.

      Admin

  29. I followed these steps but search console is giving me a 404 on the sitemap. I never had such problems submitting sitemaps

  30. In my website, I generated sitemap using this tutorial, however I want to remove one particular non-existent URL from the sitemap as it’s giving 404 error and google adsense is showing crawl error. How do I remove one particualr URL from sitemap and ask google to stop crawling that URL?

  31. I did your step for the sitemap. Awesome! Also, for my robots.txt file I have the following, should I change that first line of sitemap to what yoast says? I am not even sure where I got that old sitemap from but don’t want to mess anything up.

  32. Hi.
    Very helpful information.
    I want to ask if it is okay to submit my site to other webmasters like bing, yandex and others.
    Thanks so much.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.