SurgeGraph’s Year End Sale and Bulk Generation are live! Write 50 articles in one go now.
Get Bulk Generation – Save Up To $105

How to create an XML sitemap? Definition and Tips

How to create an XML sitemap

What is a sitemap? How to create a sitemap? I’ll share a quick guide on the basics of sitemap and how you can use it to boost your SEO.

Here is everything you need to know about the XML sitemap. 

The biggest struggle of all small businesses’ websites is page indexing.

When you’re starting, Google doesn’t know about your website.

You would like to rank high in the search engine, but if nobody knows about you, nobody will link back to you, and you won’t rank high.

That’s what a sitemap can help you with.

Sitemaps are files that tell Google you exist and help it understand the structure of your website.

XML Sitemaps
Source: WordPress.Org

Google will then index your website and start showing you to people.

But that’s not all a sitemap does. In fact, it can have even better benefits for larger websites.

We’ll look at sitemap examples and the best practices to make your website easily understandable by Google.

It’ll help you with indexing and ranking higher.

What Is A Sitemap?

Sitemap creates a vital part of technical SEO

It’s a hierarchical list of all webpages your website has.

The search engine will crawl through the sitemap, find your webpages, and index them.

What happens when you don’t have a sitemap?

According to Google, If your site’s pages are correctly linked, Google can usually discover most of your site.

But do you want to rely on “usually discover” or be entirely sure?

It’s always a good idea to create a sitemap.

Google indexing A.K.A. discovering new webpages happen through backlinking.

JavaScript SEO – How Does Google Crawl JavaScript
Image source : SEOPressor

But if you have a new site, you have zero backlinks because nobody knows about you.

Google will have trouble finding your site, and you won’t show up in the search results.

That’s why most websites never rank on Google.

Fortunately, creating a sitemap can fix that and help you stand out from other unsuccessful websites.

3 Reasons Why You Need Sitemaps

You know what sitemaps are.

But you might be wondering if you need them.

We’ll look at 3 reasons why having a sitemap is beneficial.

1. Faster Indexing

Google bots crawl through websites at immense speed.

But there are lots of websites, and they can easily miss yours.

Chart: How Many Websites Are There? | Statista
Image source : Statista

Whether they miss it or not, creating a sitemap can help them index your pages faster.

Despite so, it’s essential to create relevant and valuable content for your audience. You may use Content Intelligence to do so. 

BiQ’s Content Intelligence provides you with the best content-driven strategies, which are SEO-friendly. While you write in the block editor, you will also be getting interactive writing tips to help you. 

You will be able to see your content grade, keyword counts, content relevancy, plus loads more in the real-time text editor. You’ll also quickly know if you’ve included enough keyword density. 

If you have already published your content, you may also use the content tool to check any critical issues hurting your search engine ranking.

It will analyze your content and show you all errors that can be further improved. 

The ‘WordVector SEO’ will show your keyword performance. At the same time, the ‘Fundamental SEO’ tells you the on-page SEO performance.

They’re a lifesaver if you want a quick insight into how your content is performing. It will unveil all critical SEO errors in your content. 

Both the ‘Important’ and ‘Alert’ tab shows errors that have impacted your search rankings. Start fixing the errors in the ‘Important’ tab because it needs your attention more than the ‘Alert’. You will see a list of errors and the actions you need to take to fix them. 

Great content combine with a correct sitemap will further boost your content indexing. 

Start fixing them to improve your content performances today. 

2. Better Understanding

If your site is large, it’s very complicated.

Google can get confused. 

It can misinterpret some of your webpages, and you may not show it in the search results.

You can prevent that by clarifying the whole structure of your website by providing Google with a sitemap.

3. Avoid Duplicate Content

Sometimes more URLs are pointing to the same webpage.

Consider the following two URLs.


They point to the same product – a black and white jacket.

However, Google bots perceive them as separate websites.

It may confuse Google bots and hurt your rankings.

Fortunately, that’s not the case with sitemaps because they detect it and help you avoid duplicate content.

You can then select the main URL and mark others as duplicates.

This will help you rank the webpages properly.

What Are The 2 Main Types Of Sitemaps?

A sitemap doesn’t play a role only in page indexing.

It can be a great way to plan and organize your content.

There are 2 sitemap types – HTML and XML.

HTML Sitemap Type

A long ago, there was no such thing as rollover navigation bars.

If you wanted to see the page structure and content, you would look into HTML sitemap.

It’s outdated, yet a few websites still use it, like the one below.

However, it’s wrong to say that they’re useless.

They can be great for website organization and serve as a content planner.

You can create an HTML sitemap like the above or design it and make it more visually-friendly. 

It all depends on what you prefer.

HTML sitemaps have no impact on SEO compared to XML sitemaps.

XML Sitemap Type

The most crucial type of sitemap is XML.

XML stands for Extensible Markup Language. It’s a machine-readable code.

It’s usually automatically generated by the sitemap tools.

You can see an XML sitemap example code below.

How to Use XML Sitemaps to Boost SEO
Image source : Search Engine Journal

There are also a bunch of parameters, such as:

  • <loc> – the place where the actual URL is located
  • <lastmod> – the last time the page was modified
  • <changefreq> – how often you make changes to the page
  • <priority> – homepage has the highest priority, then you go down the hierarchy

Many SEO experts are telling you to use all of them. However, as it turns out, Google ignores most of them.

You also shouldn’t mess with the <lastmod> parameter.

Leave everything as it is generated by the sitemap tool.

There are also 3 other XML additional sitemap types.

  • Image sitemap – add the location to images, which can help to rank in Image search.
  • Video sitemap –  add category and additional info, which can help you rank higher in Video search.
  • News sitemap – great for news content and ranking high in Google News.

Including them in your website can help you rank higher or get to the featured snippet.

Featured snippets sit at the top above all search results.

How to Optimize for Google's Featured Snippets to Build More Traffic - Moz
Image source : Moz

But, there’s a newer and much better option – schema markup.

It’ll help you do the same, but it’s faster, easier, and more effective.

What Does A Sitemap Look Like?

It’s always a good idea to see a good sitemap example to understand what your sitemap should look like.

It’s neat, clean, and works perfectly.

Everything is nicely formatted, and all parameters are set right.

It’s the best practice to make the first URL your homepage.

That’s where Google bots should start crawling.

However, if you don’t, don’t worry. The order of the URLs in the sitemap has no impact.

What Does A Sitemap Shouldn’t Look Like?

You saw a good example of an XML sitemap.

However,  let’s also look at the opposite spectrum to understand it even better.

How does a bad sitemap look like?

You can see in the red rectangle; there’s <lastmod> parameter.

Google must know the last modified date. If you don’t include it, Google won’t index your page.

There can also be a problem with the wrong date format.

As you can see, there’s a wrong month number – 13.

This page won’t get indexed nor show up on Google.

The last thing is missing an </url> parameter in any URL.

It’ll completely mess up the whole XML and prevent it from working correctly.

How To Create A Sitemap Properly?

You can create a sitemap manually.

But there’s a big chance you make a mistake that will lead to an unindexed page.

It’s a much better way to use a proper tool.

Sitemap For WordPress Website

WordPress is the most popular CMS.

There’s a big chance you’re running a WordPress site too.

That’s why we will look at how to build sitemaps with WordPress.

Like with everything, there’s a plugin for it.

We’ll be using the most popular sitemap plugin – Yoast SEO.

Yoast plugin

The best thing about Yoast is that it creates a dynamic sitemap.

Dynamic sitemap updates automatically as new sites are created, so Google can index them appropriately.

Go to the Yoast SEO General settings and turn on XML sitemaps.

Click on the question mark (?) and select “See the XML sitemaps.”

XML Sitemaps

You’ll get redirected to the main XML sitemap, where you can see all generated sitemaps for your website.

The website’s URL is where your main sitemap is located.

Write it down because you’ll need it later for submitting your code to Google Search Console.

That’s all you need to do to generate an XML sitemap in WordPress.

If you aren’t a fan of Yoast, don’t worry. There are other plugins like Google Sitemaps XML that will do the same.

Sitemap For Non-WordPress Websites

You might not run the WordPress site.

If that’s the case, don’t worry, we got you covered.

There are a lot of online sitemap tools like

It’s the same thing – they analyze your website and generate a sitemap file you can download.

When you generate the sitemap file, it’s a good idea to check it.

Scroll through it and look at it if everything looks fine.

After that, you need to add it to your website manually.

Log in to your website through FTP and go to “public_html.”

Find your website URL and click on it.

You’ll get to the folder with your website – there should be an index.html file.

You should put the sitemap file there.

Be sure to name it “sitemap.xml.”

After that, it’s time to submit your website to Google Search Console.

How To Submit Your Sitemap To Google?

You can create a sitemap, but you are only wasting your time unless you submit it to the Google Search Console.

If you want Google to know about your website, you must submit the sitemap file.

Login to Google Search Console and go to “Index” → “Sitemaps.”

You’ll see a list of your existing sitemaps (if you ever submitted some).

You’ll also see an “Add a new sitemap” section above the list.

You’ll need to type in the location of your sitemap there.

How To: Add a Sitemap to the Google Search Console – Support Center

Hit Submit to finish the process.

You’ll see the sitemap in the submitted sitemap list.

If you see the “Success” status, it means that everything is okay.

However, it’s always a good idea to do an additional manual check.

Click on the “/sitemap.xml” in the submitted sitemap list to see more details.

You should see “Sitemap index processed successfully” if everything worked out fine.

Click on “See Index Coverage” to see the in-depth sitemap report.

You’ll get the detailed statistics about the sitemap you submitted.

There are three main areas you should look at.

  • Error
  • Valid with warnings
  • Excluded 

Errors usually appear when you put the sitemap in the incorrect place.

Therefore, always put your sitemap directly after

Google won’t index pages with errors.

Valid with warnings usually happens when there’s a collision between Robots.txt and sitemap file.

You could disallow indexing the specific web page in the Robots.txt and then index it in the sitemap file.

Fix that by going to Robots.txt and correcting it.

However, even if you don’t fix it, the pages will still be indexed.

Excluded means that the page wasn’t indexed, but Google thinks it wasn’t your intention to index it.

But it’s always a good idea to check it manually.

Click on the Excluded pages to see more details.

If you look closely, Google tells you that these are the pages with duplicate content.

When you look at the list, you can tell precisely if that’s the case.

These are the pages that shouldn’t be indexed in the first place.

Google was right; it’s better when they’ll be excluded.

You should remove them from the sitemap and resubmit it.


Sitemap plays a crucial role in the page indexing.

It’s vital if you’re just starting or have a big website with tons of webpages.

Sitemaps will notify Google about your website and help it identify its structure. 

Google bots can then crawl through it and interpret it better.

It’ll help you show up in the search results and rank higher.

However, It’s essential to have a working sitemap file without any errors, or you risk not indexing the webpages properly.

Fortunately, you can achieve that by following the sitemap tips we’ve discussed in this guide. 

Let me know if you have any other questions on the XML sitemap in the comments below. 

About Allysa
Allysa is always eager to learn something new whenever she got some free time and that includes SEO and inbound marketing. She also has a passion for traveling and discovering the unknown.