SEO has become increasingly important today. Everyone is making a significant investment to rank high in the SERPs and sustain it.
But what if your pages and blog posts don’t get indexed? Or the crawler discovers them quite later as per its own sweet will?
Your website will not get any traffic for the time being, despite having all other things on point.
Sometimes it can take upto 6 months to rank on Google SERPs. And a few more months to rank higher.
To fast forward this process, you can create an XML sitemap for your website.
You might think that it takes time to create a sitemap, which is not entirely true.
There are ways you can create sitemaps in minutes, and this article will tell you about them, including:
- What is a sitemap?
- Why do websites need an XML sitemap?
- When do we create multiple sitemaps?
- How do XML sitemaps boost SEO?
- Best practices to build XML sitemaps
But before we jump in, let’s brush up on the basics.
What Is A Sitemap?
A sitemap is a file containing information about the pages, videos, and other files on your site and the relationships between them. Search engines like Google read this file to crawl your site more efficiently.
In simple words, it is a blueprint of your site. It helps search engines find, crawl, and index all your website’s content. Also, it specifies the importance of each page on your site.
There are two major types of Sitemaps:
- HTML Sitemaps
- XML Sitemaps
HTML Sitemaps resemble a menu on your site to help the users find the page they are looking for.
They list all the important links on your site in a hierarchy and enhance the user experience.
HTML sitemaps are not much in use today because most modern websites have easy navigation. In fact, not having one for your site is perfectly fine.
What most websites use today are XML sitemaps. They are created particularly for crawlers.
XML sitemaps help the search bots find all links in one place and index them quickly. Also, they tell them the relationships between various URLs on the site.
They contain all the necessary information, including:
- Last modified date
- Change frequency
We will focus on XML sitemaps in this article from hereon.
Why Do Websites Need An XML Sitemap?
Search engines, including Google, discover new content by crawling the web.
And they do it regularly to organize and index information available on the internet.
When the search bots visit a page, they scan through its content. They follow all the internal and external links to discover more pages.
If any detected link is not present in Google’s database, the crawlers parse its content and index it.
In case crawlers find indexed pages with updated content, they replace the old content with the most recent one.
But, Google might not always be able to discover new links on your site in this way. Or even if it does, it will take a long time.
That’s why you need an XML sitemap.
By creating an XML sitemap, you list out all the important pages and their URLs in one place.
The search spiders access the sitemap straightaway and instantly find detailed information about a web page.
This information includes:
- Location: Where is the page located
- Last modified: When was a page last updated
- Change Frequency: How often the page gets updated
Priority of a page: What is the page’s importance compared to other pages
You must specify this information (for each URL) in the XML file using this syntax:
If you build a well-structured XML sitemap, there’s a good chance that your site will get indexed faster.
With that, let’s see how to implement a sitemap.
How To Implement An XML Sitemap?
While building a sitemap in XML (manually) is possible, it is tedious and time-consuming.
Here are the steps to create a sitemap manually:
- Review the structure of your site’s pages.
- Code all your site’s URLs in XML.
- Check your sitemap file using the XML Sitemap Validator tool.
As human beings make errors, you will have to make changes several times to get the perfect sitemap.
But, I wouldn’t recommend building one for your website manually.
There are simpler, easier and accurate ways to create a sitemap.
And you can do it in less than 60 seconds! (It’s faster too.)
If you are ready to get started, we will follow a 4 step process to implement an XML sitemap quickly.
Step 1: Create an XML sitemap
There are two ways to create an XML sitemap for your site quickly. You can choose either of the two as per your requirements.
Use Yoast Plugin to Create an XML Sitemap (For WordPress Sites)
Some CMS’ have an in-built feature of automatically generating a sitemap for your site.
But, the case is not the same when you have a WordPress site in hand.
You need to use the Yoast plugin to build a sitemap for WordPress sites. It is a popular SEO tool and makes creating an XML sitemap very easy.
But before I tell you the steps, you must ensure:
- You’re using a WordPress site.
- You’ve installed the Yoast SEO plugin.
- You’ve connected your site to Google Search Console.
If you’ve checked on these points, let’s begin.
Login to your WordPress Admin account and turn on Yoast’s advanced settings. If settings are off, Yoast will not build a sitemap.
- Click on the ‘Y‘ icon with the title SEO in the left sidebar.
- Click the ‘Dashboard‘ option.
- In the Dashboard, click on ‘Features’.
- When the menu opens, look for ‘XML sitemaps‘ and switch it on.
- Click ‘Save Changes‘ by scrolling down to the bottom.
Yoast will now generate a solid and well-structured XML sitemap for your WordPress site. You should now see your sitemap at either:
With that, you’ve successfully created an XML sitemap for your WordPress site.
But, WordPress powers just 40% of websites on the internet. Web admins use other CMSs and custom-build sites too.
Note: When you build a site using Wix, Squarespace, HubSpot, or Shopify, it automatically generates an XML sitemap for your site. You don’t need the Yoast plugin, and your SEO-friendly sitemap is already on point!
Use Sitemap Generator Tools to Create an XML Sitemap (For Custom Websites)
Here’s case two. Websites that don’t use a CMS.
You can create an XML sitemap for custom websites with the help of a sitemap generator. It is a tool that automates creating a sitemap and saves you from coding it manually.
The free sitemap generators are not very reliable for websites with many pages. And for the ones that have frequent updates.
If you have a site with more than 50,000 URLs or regular content changes, you must use the paid sitemap generators.
Using the paid tools, you can create an HTML or XML sitemap. Other than that, you can use extra features like creating sitemaps for images, videos, news, RSS feeds, etc.
The key benefits of using a sitemap generator include:
- Fast and easy creation of a sitemap
- Detection and reporting of broken links
- Automatic submission to search engines
- Compatibility with all types of websites
- Sitemap updation as per need
To generate a sitemap for your site, you can use popular sitemap tools such as Screaming Frog, XML-Sitemaps, Inspyder, Slickplan, etc.
Important: If you have AMP pages implemented on your site, you don’t need to build a sitemap for it.
So now you know how to create a sitemap for WordPress and custom websites. Your next step should be testing the sitemap you’ve just created.
Step 2: Test the XML sitemap using Google Search Console
There’s a feature in Google Search Console that will help you debug your sitemap.
Login to Google Webmaster Tools and click on ‘Site Configuration’.
From there, click on ‘Sitemaps‘.
On the top right, you’ll find a button titled ‘Add/Test Sitemap‘. Click on it.
Enter the sitemap URL and click on ‘Test Sitemap’.
And Google will begin scanning your sitemap for errors.
When the test is complete, Google will display the test results.
Click on ‘Close sitemap test‘ when you finish.
If there are errors, you can correct them before adding the sitemap file to your site. And if it’s error-free, you are good to go to the next step.
Step 3: Add the XML sitemap to your site
After creating and testing your sitemap, the next step is to add it to your site.
You need to upload the XML sitemap to your site’s root folder, which is a 3-step process:
- Step 1: Log in to the control panel of your current web host.
- Step 2: Find the public_html directory. This directory contains other vital pages of your website, such as index.php.
- Step 3: Once you locate the public_html directory, copy and paste the XML sitemap in it.
And once you’ve done that, congratulations! You’ve added a sitemap.
A few additional steps can speed up the discovery of sitemaps by search crawlers:
- Add your sitemap URL to the robots.txt file.
- Submit your sitemap to various search engines.
Now I’m going to show you how you can upload the XML sitemap to Google.
Step 4: Submit the XML sitemap to Google Search Console
The last and final step is here.
It’s time to make your sitemap valuable by submitting it to Google. To start, you need to know the location of your XML sitemap.
In most cases, your sitemap will be at domain.com/sitemap.xml.
Once you find the location of your sitemap, copy the URL.
Then, go to Google Search Console.
Select your website, and your dashboard will open.
Go to the left side panel and click on ‘Sitemaps’.
You’ll find a box that reads ‘Add a new sitemap‘.
Enter the sitemap URL (that you copied) and click on ‘Submit’.
Before you submit, check that the URL ends in .xml since this is an XML file.
Once the sitemap is successfully submitted, you will see the list of submitted sitemaps below it.
The list of submitted sitemaps also shows the status of the sitemap and the number of URLs it contains.
If there are errors in your sitemap, your submission will be unsuccessful. You can have a look at these errors and rectify them in the Sitemaps Report.
After removing the errors, you can submit it again to Google (repeat the same steps).
These 4 steps sum up the implementation of XML sitemaps.
Now, let’s look at the scenarios when your website requires multiple sitemaps.
When Do We Create Multiple Sitemaps?
Multiple sitemaps help you organize the pages and content of your website.
They ensure the search bots don’t miss out on your site’s URLs and drop them from the index.
Your site can have multiple sitemaps when:
- You want to create different sitemaps for images, videos, and podcasts on your site. There will be a dedicated sitemap for each content format.
- You want to create a sitemap for your site’s pages and another one for blog posts. Your site will have a static sitemap listing all the pages and a dynamic one listing the blog URLs.
- You want to collect the blog posts of a particular year in one sitemap. There will be multiple year-wise sitemaps, each corresponding to a specific year.
- You have more than 50,000 URLs on your site, or your current sitemap exceeds 50 mb in size. If the sitemap exceeds the limits, you’ll have to create a new sitemap.
Here I’d like to add that all sitemaps remain in use unless the site owner discards them.
If you have n sitemaps installed on your site, search bots will access all of them as long as they are free from errors.
When creating multiple sitemaps, you can set the crawl priority for each sitemap. The ones that get updated frequently can have higher priority over others and vice versa.
How XML Sitemaps Boost SEO?
Sitemaps boost SEO as they help search bots to:
- Crawl your site effectively
- Index every page on your site
- Discover new pages on your site
- Know priority of pages on your site
- Learn the update frequency and last modified date of a page
- Detect duplicate content on your site and notify it
With that, sitemaps also help large websites to organize their information well.
You can quickly check whether your site has an XML sitemap added to it or not by using RankWatch’s free website analyzer.
If it shows a green tick, your sitemap is up and running successfully for your site.
What Are Best Practices for XML Sitemaps?
Creating a sitemap and creating an SEO-boosting sitemap are two different things.
You must follow the best practices to ensure you create one that helps search engines crawl your site.
Here are some fundamental best practices for XML Sitemaps:
1. Set Priority For Your Site’s Pages:
Google’s sitemap guidelines tell you to rank your web pages in order of their relative importance.
You have to give them a score between 0.1 and 1, where 1 means the highest priority.
Search bots crawl the pages with high priority more often than those with a lower score.
The best practice is to assign higher scores to your dynamic pages – the pages with frequent updates. And for static pages, you can set low priority.
2. Categorize Your Pages And Content:
XML sitemaps help search engine spiders to understand your website’s structure and content.
You must specify the similarities and hierarchies between pages on your site in the sitemap. It helps you categorize your website’s content and form a structure.
Most websites have a homepage, categories, and subcategories as the primary structure.
If you also have a similar structure, ensure your sitemap has all these URLs in the same hierarchy.
3. Avoid Creating A Sitemap Manually:
Another good practice is to use a sitemap generator tool or a plugin to generate XML sitemaps. It’s not just faster, but also convenient.
In comparison to manual sitemap creation, automatic sitemaps have an upper edge.
4. Place Sitemap In The Right Places:
When it comes to best practices, the placement of a sitemap on your site is important.
It helps search bots discover the sitemap easily and index your site’s links.
The ideal locations to put your sitemap are your homepage and the root directory.
5. Set Limits Of URLs For Each Sitemap:
With a medium or large website in hand, you have many URLs. The best way to organize them is to create dedicated sitemaps.
For example, if you have links for each category, you can create category-wise sitemaps. It will limit the number of URLs you include in each sitemap.
6. Exclude Noindex and Canonical URLs:
Noindex URLs are those which you mark as non-discoverable. Search bots don’t find and index them.
You should use noindex tags when you don’t want certain important pages to show in the SERPs.
When it comes to sitemaps, refrain from adding noindex pages to them. It wastes the crawl budget and time and gives a contradictory message.
You should maintain consistency and avoid creating confusion for search bots.
7. Implement Dynamic Sitemaps If Your Site Updates Regularly/Frequently:
Dynamic sitemaps get updated automatically when you add or remove pages on your site. The sitemap remains up to date at any given time.
Moreover, dynamic sitemaps are faster to access by search bots. Thus, they save the crawl time. Also, they have fewer chances of being corrupted.
So, you must implement dynamic sitemaps on your site. It gets modified as per set conditions and stays relevant to the time.
XML Sitemaps Ensure Faster And Better Indexing
With billions of websites on the internet, search bots have a tough time crawling all of them every day.
You can very well get it as it takes about three months for Google bots to crawl and index a new website.
However, if you have an XML sitemap in place, you make their task easier. So, add an XML sitemap to your site and leverage its benefits today.
If you have queries, I’m here to hear you out. Drop them in the comment section below.