How to Create an XML Sitemap for Your Website (and Submit it to Google)


How to Create an XML Sitemap for Your Website (and Submit it to Google)An XML sitemap is a powerful tool that informs search engines about all the pages that exist on your website. Without a sitemap, Google may find it difficult to navigate all the pages on your website.

Luckily, you can create and submit an XML sitemap to Google within a few minutes.

In this article, we’ll provide a step-by-step guide to creating your XML sitemap and submitting it to Google.

Before we dive in, let’s cover some of the basic things you should know about sitemaps.

What is an XML Sitemap?

A sitemap is an XML file that lists the URLs for a site. It also allows website owners to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site.

This allows search engines to crawl the site more efficiently and find URLs that may be isolated from the rest of the site’s content.

Here’s an example of what an XML sitemap looks like:

XML Sitemap Example

Image Credit:

Before we show you how to create a sitemap, let’s understand why you’d need one in the first place.

Why You Need an XML Sitemap

One of the biggest misconceptions about XML sitemaps is that they help your webpages get indexed. Google doesn’t index your pages just because you submitted your sitemap to Google Search Console. Google indexes them based on their quality and relevance. That said, by submitting your sitemap to Google, you’re giving a hint that your pages are worthy of indexation.

If your site has very few webpages, then you may not need a sitemap. But if your site is large, Google web crawlers may find it difficult to crawl your new or recently updated pages. In such cases, you can make it easier for Google to crawl your website by creating a sitemap and submitting it to Google.

Here’s what Google has to say about sitemaps:

If your site’s pages are properly linked, our web crawlers can usually discover most of your site. Even so, a sitemap can improve the crawling of your site.

While there are several SEO benefits of using an XML sitemap, here are the 3 main reasons you should use one:

  • Sitemaps help Google crawl your website in a more effective way.
  • Sitemaps allow search engines to prioritize certain content over others.
  • Sitemaps indicate to search engines how often your content is updated.

How to Create an XML Sitemap

Now that you know the importance of creating a sitemap, let’s get started with the process of creating an XML sitemap for your website.

There are several ways you can create an XML sitemap. Below, we have listed down all the different ways you can create and submit your sitemap to Google. Choose a method that suits your site’s current configuration.

1. Creating an XML Sitemap in WordPress

WordPress powers 33.4% of all websites on the web.

If your site is powered by WordPress, here’s what you need to know: WordPress doesn’t automatically generate a sitemap for your website. As such, you’ll need to rely on a WordPress plugin to do this for you.

There are two plugins I’d recommend for this task — Google XML Sitemaps and Yoast SEO. You can choose either one of these plugins to generate a sitemap.

Method 1: Using Google XML Sitemaps Plugin

The Google XML Sitemaps plugin does exactly what it’s supposed to do — it generates a complete XML sitemap for your site which you can then submit to Google and other search engines.

To install and activate this plugin, login to your WordPress dashboard.

Go to Plugins —> Add New, and search for “Google XML Sitemaps.”

Click on the “Install Now” button and hit “Activate.”

XML Sitemaps Plugin

Once the plugin is activated, it automatically generates a sitemap for you. To view your sitemap, visit

You can also tweak the plugin settings to prioritize certain pages over others and exclude pages from the sitemap.

To open the plugin configuration page, navigate to Settings —> XML Sitemap —> Basic Options. 

XML Sitemaps Plugin Settings

Next, you can scroll down to find “Sitemap Content.” An SEO best practice is to exclude tag pages and archives from the sitemap file. To do this, uncheck the two boxes as shown below:

XML Sitemap Settings

You can scroll further down to tweak other settings as well — change frequencies, priorities, etc. Once you’ve made the necessary changes, click on “Update Options” to save your changes.

Method 2: Using Yoast SEO Plugin

Yoast is the best SEO plugin on WordPress by a country mile and chances are you’re already using Yoast to optimize your page titles, meta description, and so on.

If for some reason, you’re not keen on adding an additional plugin just to generate a sitemap, then you can use Yoast SEO plugin to generate the same.

If you’ve not installed Yoast yet, just follow these steps to install and activate this plugin.

Go to Plugins —> Add New, and search for “Yoast SEO.”

Click on the “Install Now” button and hit “Activate” once it’s installed.

Yoast SEO Installation

Once it’s activated, go to SEO —> General —> Features.

Just turn the “XML sitemaps” toggle on to generate your sitemap.

XML Sitemaps Yoast

You can view your sitemap at either or

2. Creating an XML Sitemap in Wix

More than 3.5 million sites have been built using Wix, an Israeli cloud-based web development platform. If your site is run on Wix, then you don’t have to worry about manually generating a sitemap.

A sitemap is automatically generated by Wix’s server and is always kept up to date with your site’s information. To view your sitemap, just visit

Wix recommends that you submit your sitemap each time you publish new content or make changes on your site.

3. Creating an XML Sitemap in HubSpot

Just like Wix, HubSpot automatically adds your live HubSpot-hosted website pages and blog posts to your sitemap.

To view your XML sitemap in your HubSpot account, click the Settings icon in the main navigation bar.

Navigate to Domains & URLs —> Sitemap, and then click on “View XML file.”

HubSpot Sitemap

Image Credit: HubSpot

This will open your XML sitemap in a new tab. Alternatively, you can also visit to view your sitemap.

You can also edit your sitemap by clicking on your domain dropdown menu and selecting sitemap. To add a new page to your sitemap, click “+ Add a page.” To exclude an existing page from your sitemap, hover over a page and click “Remove.”

HubSpot Sitemap Configuration

To further customize the pages in your sitemap, hover over a page and click “Options.”

Click the Change frequency dropdown menu to select how often this page updates and should be crawled. Click the Priority dropdown menu to rank how this page compares to the other pages on your site.

Once you’ve made changes to your sitemap, be sure to hit the “Save” button.

4. Creating a Sitemap in Shopify

All Shopify websites automatically generate an XML sitemap file that contains links to all your products, product images, pages, collections, and blog posts.

The sitemap is automatically updated when you add a new webpage, product, collection, image, or blog post to your Shopify eCommerce store.

You can view your sitemap at 

5. Creating a Sitemap in Squarespace

Squarespace is quickly becoming a popular content management system (CMS). It is currently used by 2.8% of all websites on the internet.

Squarespace also generates a sitemap automatically for your website. You can view it at

6. Creating a Sitemap in Screaming Frog

Screaming Frog is a desktop program (available on Windows & Mac) that crawls your websites’ links, images, CSS, script and, apps from an SEO perspective. In other words, Screaming Frog’s web crawler (called SEO Spider) does a thorough technical site audit for your site, helping you make informed decisions about improving your site’s overall SEO.

If your site has less than 500 pages, then you can download the free version of Screaming Frog and generate an XML sitemap for your site.

Once you’ve downloaded and installed Screaming Frog, navigate to Mode —> Spider.

Enter your domain in the search box and hit “Start.”

Screaming Frog Crawler

Screaming Frog will take a few minutes to crawl your website. Once the crawl is finished, look at the bottom-right corner to see the total number of pages that have been crawled.

If the number is less than 500, go to Sitemaps —> XML sitemap.

Screaming Frog Sitemap Generator

You can tweak the settings in Last Modified, Priority, and Change Frequency tabs. Ahrefs indicates that Google doesn’t pay much attention to these settings, so you can go ahead and exclude them from the sitemap file.

Hit “Next” and save the sitemap to your computer.

Your XML sitemap is now ready for submission.

How to Submit an XML Sitemap to Google

Now that your XML sitemap is ready, it’s time to submit it to Google. In most cases, your sitemap will be located at

If you’ve not registered your site with Google yet, just follow these steps:

  • Visit Google Search Console, click on “Start” and sign in to your account with the email address that you’d like to be associated with your domain.
  • Enter your domain in the “Domain” column if you’d like to verify your domain ownership via DNS record, or enter your domain in the “URL Prefix” column to verify your ownership using other methods (HTML tag, Google Tag Manager, etc.) Once you’ve entered your domain, hit “Continue.”

GSC Domain Verification

  • Verify your domain ownership using any method you prefer.
  • Once you’ve logged into your Google Search Console dashboard, navigate to Sitemaps —> Add a sitemap.
  • Enter your sitemap URL and hit “Submit.”

GSC Sitemap Submission

That’s it. Your sitemap has now been submitted to Google.

Final Thoughts

Sitemaps are not magical tools that will automatically index your pages and help you rank better in Google search results. But they do make Google’s job easier of crawling and indexing all the important pages on your site.

If you want to improve your Google search rankings, you need a combination of high-quality content, authoritative backlinks, and on-page optimization. Add a sprinkle of luck and good timing in there and you’d have arrived at your magic formula to improved Google rankings.

Now that you all there is to know about creating and submitting XML sitemaps, it’s time to get started. Create an optimized XML sitemap using any of the methods above and submit the same to Google via Google Search Console.

If you have any questions, please share them in the comments section below. I’ll try to answer them as best as I can.

If you found this article useful, please share it on Twitter using the link below:

Editor’s Note: This article was first published on 9 April 2020 and has been updated regularly since then for relevance and comprehensiveness. 

Related Articles

Sandeep Mallya
Sandeep Mallya is the Founder & CEO of Startup Cafe Digital, an award-winning digital marketing agency in Bangalore, India. He is an active member of the startup community, having worked with several early-stage startups and accelerators. 99signals is Sandeep's online marketing blog. The blog currently features 200+ in-depth articles, how-to guides, and hacks on a wide range of online marketing topics such as SEO, social media marketing, content marketing, blogging, and more.


  1. Hi Sandeep,

    Thank you very much for this informative post on setting up a sitemap.xml file. I knew how to create one and submit it to the Google Search Console before but this actually showed me a few things in the Search Console that I was not aware of before.

  2. Great information, thank you. With Frog we have made sitemaps for different clients. Now one of them has a WordPress site. Yoast – okay – but is there a way to generate 1 page for a WP sitemap instead of “This XML Sitemap Index file contains 8 sitemaps”?.

  3. Hi Sandeep, I’m googling like crazy and came across this post which is good. Quick question, I’m on wix and have blog posts embedded with youtube videos. I have sitemaps submitted and all my pages are indexed but I don’t think my videos are being read properly and I am thinking I need to submit a video sitemap. Would you agree regarding the video site? I am just getting started with SEO optimization.🙏🏼Nick

    • Hi Nick – Glad you found the post useful. I don’t have any experience with Wix sites. As discussed in the post, I was under the assumption that Wix automatically generates a sitemap for you, regardless of the nature of your site. That said, to be on the safer side, if you’re having indexation issues, generate and submit a video sitemap for your site manually.


Please enter your comment!
Please enter your name here