How to create Sitemap and codes

The main advantage of which is to use XML Sitemap is that we are inclusion of Metadata. This is the benefit that we can give additional information in the contents of all the pages. An XML Sitemap is created like this.By the help of these all things we create sitemap.

Step 1: First create a Text File, then name it ‘Sitemap’ and save it in .xml format.

Step 2: After that, we have to inform the search engine how Sitemap encoded, for which we have to use the given script.

  1.  <? Xml version = “1.0” encoding = “UTF-8”?>
  2.  <urlset xmlns = “http://www.sitemaps.org/schemas/sitemap/0.9”>
  3. </ urlset> 

Step 3: In the next step, we add all relevant URLs.

We do this before turning off the urlset tag. You can see the steps to do the URL entry below.

  1. <url>
  2. <loc> http://www.website.com/ </ loc>
  3. <lastmod> 2012-12-12 </ lastmod>
  4. <changefreq> daily </ changefreq>
  5. <priority> 1 </ priority>
  6. </ url> 

Here the loc-tag is used to link the page. Here you can insert your URL in between these tags. Lastmod indicates when you last modified the page. Change-freq means that how many times you have changed that page, frequency of change (is (hourly, daily, weekly, monthly, yearly …). You have to use ‘never’ for the archived URL.

You can categorize your pages according to their priority, using priority-tag. The Priority values ​​range from 0.0 to 1.0 (1.0 is most important). By default page’s priority is 0.5. Rather than giving more priority to all pages, the rank will not increase as it is all relative. Here the loc tag is compulsory, but lastmod, changefreq and priority tags are optional.

What is Sitemap and all info about Sitemap

Step 4: Now that you have created a Sitemap, now it’s time to upload it to your site. It should be added to the root directory only. When you’re creating a Sitemap, you should be especially careful about some things:All of the URLs should come from the host of a sitemap.The maximum length of any URL should be 2,048 characters.Can keep up to 50,000 URLs in a sitemap.The maximum file size of a Sitemap is 50 MB.If your Sitemap is large enough, you can split or divide it into multiple Sitemaps, for which you have to add a Sitemap Index file.

This is similar to normal sitemap but here some tags have different names. You can see the example below:

  1. <? Xml version = “1.0” encoding = “UTF-8”?>
  2. <sitemapindex xmlns = “http://www.sitemaps.org/schemas/sitemap/0.9”>
  3. <sitemap>
  4. <loc> http://www.website.com/sitemap1.xml </ loc>
  5. </ sitemap>
  6. <sitemap>
  7. <loc> http://www.website.com/sitemap2.xml </ loc>
  8. </ sitemap>
  9. </ sitemapindex>

Here, the Sitemap Index file is linking two sitemaps to the <loc> tag. Theoretically, we think a Sitemap Index file can link up to 50,000 Sitemaps. How to validate a Sitemap Everyone knows that how easy it is to find the error can be found in your code, that is why it is a good way to validate before submitting our sitemap so that it is error free. Well there are so many free tools available in the internet to check validity. But we use Google Webmaster Tools to test XML Sitemaps. For which you have to click add / test Sitemap Button which is below the Optimization> Sitemap, which allows us to check before submitting Sitemap.

Informing  Search Engines

Now that you have even made a Sitemap and have validated it is now time to tell the Search Engines about it. To inform you, you’ll need to give Google and Bing the location of your Sitemap. For Google you need to be logged in to your account, then you will have the Optimization> Sitemaps, with the ‘add sitemap’ button in its right side. Where you have to paste the URL of the Sitemap and finish the job. For Bing you will have to use Bing Webmaster Tools to submit Sitemap and also place the location of the sitemapAlternatively you can include your URL in the robot.txt file as well. For which you need to write an extra line.

Sitemap: http://techmantri.com/sitemaps 

If you have a Sitemap Index file then you do not need to enter an additional line.

Conclusion

I think so far you may have understood well how much a Sitemap is necessary, if you want any page of your website not missing then you have to take care that the Crawlers do not miss any page. You can also add additional Metadata such as Change Frequency and Priority. With this you can also create a Sitemap for Video and Image. And once you’ve created a Sitemap, make sure to validate it and notify Search Engines.

I sincerely hope that I gave you full information about what people are saying (what is a Sitemap) and hope you guys have understood about Sitemap. I am convinced of all the readers that you too share this information with your neighbors, relatives, your friends, so that we will be aware of our interactions and will all benefit from it.

I need people’s support from you so that I can bring you even more new information.If you have any doubt of any kind, then you can ask me uncomfortable. I will definitely try to solve those Doubts. What is this article Sitemap and how to create a Sitemap? Let us know by writing the comment so that we too can get a chance to learn something from your thoughts and improve something.

No Responses

Leave a Comment

Your email address will not be published. Required fields are marked *

error: Content is protected !!
%d bloggers like this: