An XML sitemap is a powerful tool which 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 to find URLs that may be isolated from rest of the site’s content.
Here’s an example of what an XML sitemap looks like:
Image Credit: Sitemaps.org
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.”
Once the plugin is activated, it automatically generates a sitemap for you. To view your sitemap, visit yourwebsite.com/sitemap.xml.
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.
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:
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
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.
Once it’s activated, go to SEO —> General —> Features.
Just turn the “XML sitemaps” toggle on to generate your sitemap.
You can view your sitemap at either yourwebsite.com/sitemap.xml or yourwebsite.com/sitemap_index.xml.
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 yourwixwebsite.com/sitemap.xml.
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.”
Image Credit: HubSpot
This will open your XML sitemap in a new tab. Alternatively, you can also visit yourhubspotsite.com/sitemap.xml 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.”
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 yourshopifystore.com/sitemap.xml.
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 yoursquarespacesite.com/sitemap.xml.
6. Creating a Sitemap in Screaming Frog
Screaming Frog is a desktop program (available on Windows & Mac) which 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 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.
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 yourwebsite.com/sitemap.xml.
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.”
- 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.”
That’s it. Your sitemap has now been submitted to Google.
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:
[ctt template=”3″ link=”9zUQy” via=”yes” nofollow=”yes”]How to Create an XML Sitemap for Your Website (and Submit it to Google)[/ctt]