How to Create an XML Sitemap in 30 Seconds (and Submit It to Google)

How to Create an XML Sitemap

Table of Contents

In this post, you are going to learn how to create an XML sitemap within 30 seconds and submit it to Google.

Additionally, I’ll show you the common sitemap errors that you need to avoid.

Let’s dive right in.

What is sitemap?

A sitemap is an XML file that contains all of your website’s important pages. It helps search engines to understand your website structure.

It presents your website in an organized way to the search engine such as website title, content, categories, comments, tags and more.

Curious Fact: A sitemap has a limit of 50000 URLs, and it shouldn’t be more than 50mb in size. If you have more URLs, then you will need to make another sitemap.

Additional read:  How to Do Mobile SEO

How does and XML sitemap looks like

You might get confused when you see sitemap first time. Sitemap is for search engines to understand your website structure. Here is how XML sitemap looks:

<?xml version=”1.0″ encoding=”UTF-8″?>

<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>

               <url>

                               <loc>https://curiousblogger.com/</loc>

                               <lastmod>2019-08-21T16:12:20+03:00</lastmod>

               </url>

</urlset>

Let’s dig them deeper.

XML declaration

<?xml version=”1.0″ encoding=”UTF-8″?>

This is the first line of code of a sitemap that tells search engines that they are reading an XML file. It also shows the version of XML and character encoding used. For XML sitemaps version should be 1.0, and encoding would be UTF-8.

URL Set

<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>

It is a container of all the URLs in the sitemap that tells crawlers which protocol standard is being used. Major search engines like Google, Yahoo!, and Microsoft support 0.90 standards.

URL

<url>

<loc>https://curiousblogger.com/</loc>

<lastmod>2019-08-21T16:12:20+03:00</lastmod>

</url>

This is the parent tag for each URL present in your website. It must be placed within <loc> and </loc> tag. Make sure you put the original URL between the tags, not duplicate or query generated URL.

Additional read: How to Do Local SEO

Why do you need a sitemap?                                           

A sitemap is important when you want to the crawler to find all your web page and index them. Link index is crucial for ranking and essential for your on page SEO practices.

However, crawlers can still crawl and index pages on your website, but they might miss some links. If you want they don’t miss any links put them in the sitemap.

How to create a sitemap

There are some CMS that generates the sitemap for you. Your sitemap automatically updated when you add or remove any page or post from your website. In case, if your CMS doesn’t make sitemap itself, then you can use sitemap generator plugins.

How to create an XML sitemap in WordPress

WordPress supports 34.6% websites, but it doesn’t create sitemap itself. If you are using WordPress, you might need Yoast SEO. Yoast SEO is a WordPress SEO plugin that creates a sitemap for WordPress.

To install Yoast SEO, login to your WordPress dashboard.

Go to Plugins > Add New.

add-new-plugin

Search for “Yoast SEO.”

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

yoast-seo

Now head over to the SEO > General > Features. You’ll see the “XML sitemaps” now click the On toggle.

xml-sitemap-yoast

You can see your generated sitemap by  typing yourdomain.com/sitemap.xml or yourdomain.com/sitemap_index.xml.

sitemap

PRO TIP

You can also include or exclude particular types of content (tags pages, category pages, etc.) from your sitemap.

category-pages-exclude

Additionally, you can exclude individual posts or pages from “Advanced” meta box on the editor.

yoast-noindex

Caution: Be careful when you’re excluding pages or posts from your sitemap. Exclude only page or post that you don’t want to appear in search results.

How to create an XML sitemap without CMS

If you have a small website which has less than 500 pages, then you can create XML sitemap without CMS using Screaming Frog SEO spider tool.

However, it is a paid SEO analysis tool, but you can use it for free with limited features that include sitemap creation for up to 500 pages.

Install the free version of Screaming Frog and go to the Mode>Spider.

Paste the homepage URL in the box next to Start button and hit it. It will take some time to complete the process depends on the website size.

screaming frog

Large e-commerce sites with thousands of URLs take an hour to crawl. After completion, it will show 100% in the status bar.

screaming frog crawl completion

Now head over to the Sitemaps > XML sitemap. You will see multiple tabs like Page, Last Modified, Change Frequency, Priority and Images.

screaming-frog-sitemap-setting

In pages, you will see pages that you want to include in your sitemap. Leave them as it is but add the PDFs in your sitemap.

Don’t bother about <lastmod>, <changefreq>, and <priority> tags. Google doesn’t pay attention to these tags better to exclude them from your sitemap.

Change Frequency In XML Sitemap File

Hit the Next button and save your sitemap in your computer. I guess you already know how to upload sitemap through FTP if you don’t know then better to get help from a developer.

How to submit an XML sitemap to Google

Your sitemap is ready now it’s time to submit your sitemap to the Google.

Don’t worry if you don’t know how to submit a sitemap to Google – it’s easy.

Login to your Google Webmaster account and head over to Sitemaps > paste in sitemap location and hit “Submit”.

Submit sitemap to the google

That’s it your sitemap is submitted to the Google.

PRO TIP

You should add your sitemap into your robots.txt file because crawler often visits this robots.txt file.

Fixing common sitemap errors that affect the ranking

It is vital for your technical SEO that your sitemap should not have any mistake. Google Search Console shows mostly technical errors in your sitemap.

You can see there is no issue in my sitemap except for three excluded. If there were an issue, it would show here.

Visit this link to learn more about sitemap errors and how you can solve them.

Here are some common sitemap errors that you need to avoid.

  • Eliminate useless, low-quality pages from sitemap
  • Submitted pages are blocked by robots.txt file
  • Submitted URL marked noindex
  • Submitted URL not selected as canonical
  • Submitted URL returns unauthorized request (401)
  • Submitted URL seems to be a Soft 404
  • Submitted URL not found (404)

Final Thoughts!

Creating sitemap is not hard if you are using CMS; all you need a sitemap generator plugin that does leg work for you.

On the other hand, using an SEO tool like Screaming Frog can make a sitemap for you in a minute or less. If you are still confused about sitemap creation better try to make one yourself today.

Go to and try to create your first XML sitemap. Comment below if you need any help in sitemap creation.

Facebook
Twitter
LinkedIn
Pinterest
Subscribe to Stay Updated

You’ll also receive some of our best posts today

newsletter
Umesh Singh
Umesh Singh
Umesh is blogger by heart and digital marketer by profession. He helps small companies to grow their revenue as well as online presence.

3 thoughts on “How to Create an XML Sitemap in 30 Seconds (and Submit It to Google)”

  1. I have never created XML sitemap but after getting through with your blog which is written very well along with the coding for better understanding. I hope this provided material will help out to work on XML sitemap.

Leave a Comment

0 Shares
Tweet
Share
Share
Pin