Hello Sunil
creating-website-sitemap-feature-image

Sitemaps: What They Are, How to Create One & Submit it to Google

When it comes to getting your website ranked, you need to take advantage of as many SEO hacks as possible. Creating a sitemap is one technique that will definitely help improve your SEO strategy.

So in this article we will show you what sitemaps are, how to create one, how to submit them to Google, and all the essential best practices.

But first, let’s cover a few basics.

What is a sitemap?

A sitemap is an XML file listing all the important content on your website. Any page or file that you want to show up in search engines should be in your sitemap.

But kindly note, sitemaps can’t list more than 50,000 URLs, and they can’t be more than 50mb in size. If your sitemap exceeds one or more of those figures, then you’ll need to create more than one.

What does an XML sitemap look like?

XML sitemaps are made for search engines, not humans. They can look a bit daunting if you have never seen one before.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://hello-sunil.in/</loc>
    <lastmod>2023-07-07T17:40:01+00:00</lastmod>
    <priority>1.00</priority>
   </url>
</urlset>

Let’s break this down.

XML declaration

<?xml version="1.0" encoding="UTF-8"?>

This tells search engines that they are reading an XML file. It also states the version of XML and character encoding used. For sitemaps, the version should be 1.0, and the encoding must be UTF-8.

URL set

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

This is a container for all the URLs in the sitemap. It also tells crawlers which protocol standard is used. Most sitemaps specify the Sitemap 0.90 standard, which is supported by Google and Bing amongst others.

URL

  <url>
    <loc>https://hello-sunil.in/</loc>
    <lastmod>2023-07-07T17:40:01+00:00</lastmod>
    <priority>1.00</priority>
  </url>

This is the parent tag for each URL. You must specify the location of the URL in a nested tag. Crucially, these must be absolute, not relative, canonical URLs.

Although this is the only required tag here, there are a few optional properties:

  • <lastmod>: Specifies the date when the file was last modified
  • <priority>: Specifies the priority of the URL relative to all other URLs on the site. Values range between 0.0 and 1.0. Higher is more important
  • <changefreq>: Specifies how frequently the page is likely to change

As per Google, none of these optional tags are that important for SEO.

How to create a sitemap in WordPress

While using WordPress you will usually utilize a plugin to generate your sitemap. Yoast is one of the most popular plugins for WordPress which is free to add to your site, and once it’s in place, Yoast will both generate and automatically update your sitemap for you.

Just go to SEO > General > Features. Make sure the “XML sitemaps” toggle is on.

yoast-seo-plugin-for-sitemap-creation

You should now see your sitemap at yourdomain.com/sitemap_index.xml.

XML sitemap generated by Yoast SEO

Tip 1: If you want to specifically include or exclude certain types of content (tags pages, category pages, etc.) from your sitemap, head to the “Search Appearance” settings.

Category pages exclude by yoast seo

Tip 2: You can also exclude individual posts or pages from the “Advanced” meta box on the editor.

Yoast SEO noindex post

How to create a sitemap in Screaming Frog

Screaming Frog is a desktop software that offers a wide range of SEO tools. It is designed to help you boost your site’s SEO by auditing issues and pulling important data.

Go to Mode > Spider.

Paste your homepage URL in the box labeled Enter URL to spider. Hit Start.

Screaming frog sitemap

Once the crawl is complete, look at the bottom-right corner. It will say something like this:

screaming-frog-total-scrape

Now go to Sitemaps > XML sitemap. Because Google doesn’t pay much attention to <lastmod>, <changefreq>, and <priority>, we recommend excluding them from the sitemap file.

screaming-frog-sitemap-settings

Hit Export and save the sitemap to your computer. Done.

Two other tools we can suggest to generate XML sitemap if you are not a fan of Screaming Frog.

How to submit a sitemap to Google

To start, you need to know where your sitemap is. If you are doing this manually, name your sitemap something like sitemap.xml then upload to the root folder of your website. You should then be able to access the sitemap at – domain.com/sitemap.xml.

Go to Google Search Console > Sitemaps > paste in sitemap location > hit Submit.

sitemap-search-console-sample

That’s it. Done.

It’s also good practice to add your sitemap URL(s) to your robots.txt file.

Also Read: Robots.txt and SEO: Everything You Need to Know

You can find this file in the root directory of your web server. To add your sitemap, open the file and paste this line:

Sitemap: https://www.yourdomain.com/sitemap.xml

You need to replace the example URL with the location of your sitemap.

If you have multiple sitemaps, just add multiple lines.

Sitemap: https://www.asos.com/sitemap_1.xml
Sitemap: https://www.asos.com/sitemap_2.xml
An example of a robots.txt file

Sitemap Best Practices

Now that you understand the importance of sitemaps, how they work, and your options for submitting them, let’s make sure the final one you create is in tip-top shape by following these best practices.

  • Use tools to generate automatic sitemaps: Manually creating and updating an XML sitemap will cost you a lot of time (and is unnecessarily complex). To save time it’s best to use an automatic sitemap generator.
  • Do regular sitemap maintenance checks and updates: All parts of SEO are an ongoing effort, so check your sitemaps regularly. Search console does an excellent job of letting you know if your submitted URLs have issues with crawling or indexing.

    You can also use Screaming Frog for sitemap maintenance. After crawling your website or sitemap URL, check the response code tab for 404 or 5xx errors.
  • Include only canonical versions of URLs in your sitemap: Your sitemap should only contain URLs that you want search engines to index. That means if a URL points to another as its canonical version, you shouldn’t include it, as it’s a statement to Google and other search engines that you don’t wish for that URL to be indexed.

    So you can consolidate your position in search engine results.
  • Split up your large sitemaps: We mentioned this above already that you need to split your sitemap into multiple files if it exceeds 50MB or has more than 50,000 URLs. Never submit large XML files to Google, otherwise some of your URLs will not be indexed – and you know well that every URL matters!

Tools – Visual Sitemap Builder

Conclusion

Creating a sitemap isn’t rocket science, especially if you are using a plugin that does the heavy lifting for you. It’s not hard to create one from scratch either—just crawl your site and format the resulting lists of URLs.

That said, it’s crucial to remember that Google doesn’t have to index the pages in your sitemap. And sitemaps have nothing to do with rankings.

Thanks for reading.

Resource

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Similar articles you may like

Sunil Pradhan

Hi there 👋 I am a front-end developer passionate about cutting-edge, semantic, pixel-perfect design. Writing helps me to understand things better.

1 comment

  • The article is a highly informative resource that demystifies a crucial aspect of website optimization. Sitemaps play an integral role in ensuring search engines can effectively crawl and index a website’s content, making this article a must-read for both beginners and experienced webmasters.

    The initial sections provide a clear and concise explanation of what sitemaps are and why they are essential for search engine optimization. By outlining the benefits of sitemaps in improving a website’s visibility in search results, the article effectively underscores their significance.

Stay Updated

Want to be notified when our article is published? Enter your email address below to be the first to know.

Sunil Pradhan

Hi there 👋 I am a front-end developer passionate about cutting-edge, semantic, pixel-perfect design. Writing helps me to understand things better.