7 Tips for Creating a XML Sitemap in 2020 [ninja2tech.com] - ninja2tech


Thursday, April 23, 2020

7 Tips for Creating a XML Sitemap in 2020 [ninja2tech.com]

7 Tips for Creating a XML Sitemap in 2020

hi  guys  this is me ankit gill and you read our article about  tips for creating sitemap

  1) tip

As a publisher, web developer, or marketer you want to reach the broadest audience possible. You've poured your passion into creating your website, and now you want others to be able to find it using Google and other search engines. Today I'm going to talk about sitemaps and their role in SEO. 

 I'm going to give you seven tips to help you get the most of your site maps so you can get your content discovered by others.  Hi.  I'm  ankit gill with Guiding Digital.  We're going to be bringing you articles on this blog  about website and best practices. So if you're a new developer, a marketer or small business owner trying to soak up all you can about the web, or if you're an experienced person trying to refine 


your skills, this blog  is for you, and so follow  below to stay informed about future content.  Before we get to the seven tips, let's briefly talk about what is a sitemap and why you need one.  A sitemap is a file that contains information about the pages, the images, and the videos on your website.  They are used by Google and other search engines to know how to crawl your site. 

 In other words, providing a sitemap to Google is your opportunity to tell Google which pages you feel are important and how they relate to each other. So the first question that might come up is do I really need a sitemap for small sites? The answer is technically no.  Google will eventually find your content, but I strongly recommend that all sites no matter what the size use sitemaps so you can maximize your opportunity for Google


 to discover content in an efficient manner. Google in their documentation states in response to the question do I need a sitemap for a small site, they say that in most cases your site will benefit from having sitemap and you'll never be penalized for having one.  So in other words, it can't hurt.  Saying all of that here's some situations where it's more important than others to have a sitemap. If you have a site with large number of pages. If you have a complex navigation structure. 

If your site is new, and finally if your site has a lot of rich media content like videos and images.  So let's get into the tips. Tip number one. Remove the clutter from your sitemap.  A sitemap is your way of telling Google the content that you recommend that Google includes in their search index.  So you should only include the pages that are relevant from a SEO perspective. This is especially important for larger sites.  When Google crawls your site, it allocates a crawl budget to your site. 

This crawl budget is determined by the crawl demand and a crawl rate limit.  Crawl demand is based on the popularity of your pages, and so Google will crawl more popular pages more often. Crawl rate limit is the rate that Google determines that it can safely crawl your site and not disrupt normal usage. Putting these together and you've got a finite crawl budget each time that Google crawls your site. 

 For smaller sites that are less than a thousand pages, this won't normally be an issue, but for larger sites you want to manage that crawl budget wisely by making sure you don't have unnecessary pages in your sitemap.  Here are the types of content you'll want to consider excluding from your sitemap. Non canonical pages.  I'm not going to go into a 


detailed definition of what is meant by canonical, but to put it simply, each piece of content on your site should only be accessible by a single version of a URL, and so if visitors can reach your site with or without the WWW prefix or by using HTTP or HTTPS, you only want to include the official canonical version of the sitemap. 

 Other sitemap items to consider removing are pages that vary only by the content of the query string values.  This could include things like session IDs, search values, search filters, and things like that.  Other items are archive pages, any pages that result in a 301 or 302 redirect, error pages such as 404 pages or 500 server errors, pages blocked by your robots.txt file or pages with a no index directive, and finally utility pages such as account management pages or legal pages.  Tip number 2.  


Focus on the important elements only.  The two elements that I would recommend for including for each sitemap entry are the location and last modified date.  Location is a required field that you should populate with an absolute path to the page.  Last modified date is the date and time your content was last updated.  The sitemap standard also supports change frequency and priority elements.  It doesn't impact anything negatively to include these, but I wouldn't recommend putting any extra effort since Google has stated that they have little to no impact on its crawling decisions.  Tip number three.  Make sure Google and Bing can find your sitemap. 

There are three ways to make Google and Bing aware of your sitemap.  The first way is to register your sitemap with Google Search Console.  To add a sitemap in Google Search Console, log into the console then go to the sitemap section. Enter the absolute path to your sitemap and then hit submit.  Another way is to add a reference to your sitemap in your robots.txt file.  I'm not going to go into detail on robots.txt files today, but just know for this video that it is a file that is located at the root of your site, that tells Google what it is allowed and not allowed to crawl.  To reference the sitemap from your robots.txt file, simply add a line prefixed with sitemap colon and then enter the absolute path to your sitemap.  Each time Google crawls your site it will check your robots.txt


 file and will pick up the location of your sitemap file.  The last way is probably the least known.  For both Google and Bing, you can ping Google or Bing to ask them to crawl your sitemap.  For Google, simply enter the following URL in the browser replacing the path to the sitemap with your sitemap.  

Tip number four.  Review any errors with your sitemap. After you submit your sitemap to Google you should check to make sure that Google did not find any errors with your sitemap.  There are two areas that I would recommend checking within the Google Search Console. The first is a sitemap status within the sitemap section.  If you see a status of success, then you're good to go. If you see a status of couldn't fetch, that means that Google couldn't read your sitemap file for some reason.  If you're certain that the URL is correct, try using the URL inspection tool to determine the reason Google couldn't fetch your sitemap. You can find the link to the URL inspection tool in the left menu of the Google Search Console. If you get a status that tells you that you have errors, click on the sitemap entry to go to the sitemap details page.  

This page will list each error along with other useful information about the error. The other source of information on sitemap errors is the coverage report. You can find the link to the coverage report in the Google Search Console's left menu.  Once you're on the coverage report, change the filter from all known pages to your sitemap.  In this report you'll want to examine and fix each item in the error tab, review each item in the valid with warnings tab, and also review each item in the excluded tab.  The excluded tab is a good way to find the duplicate or non canonical items that are cluttering up your sitemap and can be removed.  Tip number five.  Use image, video, and news site maps when needed. Google sitemaps are not just for webpages.

 Google supports sitemap extensions for images, videos, and news items as well. Image sitemaps help Google discover the images on your site.  Image sitemap entries can be added to existing sitemaps or be placed in their own sitemap. You can refer to Google Search Console's documentation for the specific format. For most sites, image sitemaps are not essential.  

The exception to this recommendation is if your images are important part of your business strategy. For example, if the purpose of your site is stock photography, then I would recommend an image sitemap.  For video sitemaps, many of the same things that we talked about concerning


 images apply to videos.  Video sitemaps are used to help Google understand the video content on your site.  Just like image sitemaps, you can create a separate sitemap for the videos or embed the video entries into your main sitemap.  Also similar to images, the video sitemap is only essential if your videos are an important part of your site's strategy.  One example might be videos that are part of a YouTube channel that you're trying to promote.  The last type of sitemap is a news sitemap.  This applies to even fewer of you so I'm not gonna spend a lot of time on news sitemaps. Consider using a news sitemap if you're generating news articles and have registered with Google News. 

 Also one other thing to note.  Don't confuse blog articles with news articles.  They're not the same and don't require a news sitemap.  One final note about sitemap extensions.  They're not a replacement for marking up your content with the appropriate schema.org markup. Adding schema markup to your pages in most cases is more important than sitemaps in making your content discoverable to Google and other search engines.  

I'm not going to go over the details of structured data markup in this video, but stay tuned for a future video where I'll dive into the details.  Tip number 6.  Break up large sitemap files using a sitemap index.  The maximum size for sitemap file is 50,000 URLs or 50 megabytes uncompressed.  For most of us we don't have to worry about those limits, but if you do manage a large site, you can get around this limit by breaking up your sitemap into multiple smaller sitemap files. You could then use a sitemap index file to reference all the smaller sitemap files, and then submit that one index file to Google. 

Here's an example of a sitemap index file. The important elements to include are a sitemap node for each child sitemap and the location element with an absolute path to the sitemap.  You can include up to 500 sitemaps in a sitemap index.  I'll let you do the math on how many pages that adds up to. Tip number seven.  Dynamically generate sitemaps. there are multiple ways of creating a sitemap file. If you wanted, you could open up notepad and manually create a sitemap.  There are also many tools that are available that you can supply your site's URL, and it will crawl your site and create a sitemap file for you.  You can then take that file, and upload it to the root of your website. However, the issue with these methods is that the generated sitemap is static. 

 If you add or remove a page on your site you have to then remember to update and re-upload your sitemap every single time. A better way if possible is to make sure your sitemap is dynamically generated. When a new page is added, you want your sitemap file to reflect it immediately. I'm not going to go into the details of how to do this in this article since it will vary based on the platform you're using, but some example of ways to dynamically generate sitemaps are the Yoast plugin for WordPress, installing the gatsby-plugin-sitemap plug-in if

 you're using GatsbyJS, or installing the XML sitemap module for Drupal.  And that leads us to the question of the day.  What tools do you use to dynamically generate sitemaps? Thanks for reading today.  If you enjoyed this artiles, hit the comment button below.  If you have any questions or comments, leave them below also, and I'll try to respond to each one. Thanks! 

author:ankit gill