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. 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!

  2. 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!

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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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?

  10. 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

  11. 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

  12. 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

  13. 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

  14. 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

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

  16. 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?

  17. 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.

  18. 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.

  19. Yoast SEO must have been updated because the check boxes are now sliders – at least on my site. When I enable the stiemap function, then click the link to view the site map, I get a 404 Not Found error. Did I do something wrong?

  20. Really helpful article! I have just having trouble when it comes to viewing my site map, it’s coming up with 404 error and I’m not sure why?

  21. Hey, there’s nothing like SEO>XML Sitemap in my WP dashboard. Does this feature work on the Premium version of Yoast SEO only? Please help!

    • Hi John,

      It works with free version as well. You will need to enable ‘Advanced settings pages’. Go to SEO » Dashboard page and then click on ‘Features’ tab. Scroll down to Advanced settings page section and click to enable them. Don’t forget to click on the save changes button.

      After reload you will see new menu items in under SEO menu. Hope this helps.

      Admin

        • Having the same exact problem. This option does not appear anywhere on my wordpress dashboard. Were you able to get any help with this?

      • there is not sitemap option, please help, in fact if i go on “mysite.com/sitemap_index.xml” there i can find the sitemap but settings are not in my dashboard.

        • Under SEO > General > Features, down by where it says XML Sitemaps, click on the question mark to expand some text.

          Click on See the SML sitemap. Then, you can add the URL for your sitemap to the Google Search Console.

        • UPHOARIA, not all heroes wear capes, my friend. Thank you!!! After an hour of trying to figure this out, this was immensely helpful!

  22. after implying the details as clearly elaborated in the blog within a month i saw the changes in my rankings this trick works no hassle. there is a great improvement in my SEO optimization ranking.

  23. Thank you for putting this up nicely, i have one question though for which i need help.
    If once i have submitted a sitemap to google and i also have my yoast SEO completely configured, then on adding new content will yoast only update the sitemap or will it automatically submit it to google as well? Or is it that i should submit the sitemap manually to google every time there is new content.

    • Hi Prakash,

      The sitemap generated by Yoast SEO automatically updates itself. You only need to submit your sitemap to Google once. However, if you move your website to a new address, then you will need to resubmit your sitemap.

      Admin

  24. A site map is a kind of interactive table of contents, in which each listed item links directly to its counterpart sections of the Web site.

  25. I have submitted my site map to google
    But still not getting organic traffic
    What should I do now???
    Plzz help me

  26. Useful manual.
    My sitemap only shows the homepage, and not the 29 other pages of my website. Any ideas on how I can solve this?
    Thanks.

  27. Great post for beginners. Thanks.
    I have a question – my site has a subdomain if i create a sitemap for the subdomain will it be part of the whole site (root plus subdomain?)

  28. My Yoast Seo XML Sitemaps won’t work with google search console.

    “We encountered an error while trying to access your Sitemap. Please ensure your Sitemap follows our guidelines and can be accessed at the location you provided and then resubmit.”

    Any ideas?

  29. Ok- your site is my new favorite best friend on the internet!! Thank you sooo much! I’m beginning to feel like a dangerous beginner ;-) Thanks for the great tutorials…

  30. Thank you so much for your instructions.
    it was very useful for me.i did all steps and i could put my site map on webmaster tool and also my blog pages only because of your helpful article.

  31. Error while submitting sitemap generated by yoast: sitemap_index.xml

    Sitemap is HTML

    Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead.

  32. Hello, thank you for the detailed article, finally I understood how it works!

    I think I did all correctly, but when I submitted the sitemap I received an error from Webmaster Tool, saying: “We encountered an error while trying to access your Sitemap. Please ensure your Sitemap follows our guidelines and can be accessed at the location you provided and then resubmit.”

    Certainly the location is correct, and their guidelines don’t give me a clue of what is happening :(

    Any idea? Thank you in advance.

    Bruna

      • HI to wpbeginner team. 1st of all thank you for your excellent work and helping beginner in such a great way. I am using All in one Seo and came to know you use for your sites Yoast Seo. Can you guide me how do I shift to Yoast without messing up my sure??
        Thank you in advance

  33. i am trying to create sitemap and i created a lot of sitemap using different plugins but when i click on sitemap it says nothing found.
    how to solve this issue

  34. Under sitemaps, for webpages, it’s saying 104 were submitted, but only 14 were indexed. Yoast SEO gave me 3 sitemaps which I added.

  35. I’m having lots of duplicate content on my website. I’m thinking that i didn’t fix the Yoasts SEO very well. How can i remove them?
    Thanks in advance

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.