InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

SEO tutorials

  • How to change twitter handle and its impact on traffic
  • How to do keyword traffic research using adword
  • How to make best use of Alexa
  • How to migrate your site from one domain to another
  • How to monitor 404 pages on your site
  • How to remove urls from Google index using webmaster tools
  • How to undo HTTP 301 site/domain redirect
  • Verify a web site in google search console
  • Wordpress SEO - beginner guide
  • Xml sitemap - quick introduction
  • robots.txt
  • www vs non-www domain which is better for your site?
 
  • Home
  • > Tutorials
  • > Web Development
  • > SEO

Xml sitemap – quick introduction

By admin | Last updated on Mar 20, 2016

Submitting an xml sitemap to Google webmaster tools is recommended way to get site urls indexed by Google. This helps google to reach various urls easily. This also let you specify priorities to urls and update date.

Sitemap format

Sitemap is usually located at /sitemap.xml but it can be at a different location also. It can also be compressed and in that case usually located at /sitemxp.xml.gz. Here is sample sitemap content:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
  <loc>http://infoheap.com/</loc>
    <lastmod>2013-07-11T18:39:55+00:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>1.0</priority>
  </url>
</urlset>
It is usually better to submit compresed (gzipped) sitemap as it will save bandwidth and can be served faster. In case the sitemap is not big, it does not matter that much.

Multiple sitemaps

You can also create and submit muliple independent sitemaps. This may be useful for large sites. You can also create and submit sitemap index files. A sitemap index file contains pointers to other sitemaps. Here is a sample sitemap index file:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
 <sitemap>
    <loc>http://example.com/sitemap1.xml</loc>
    <lastmod>2013-07-13T18:23:17+00:00</lastmod>
 </sitemap>
 <sitemap>
    <loc>http://example.com/sitemap2.xml</loc>
    <lastmod>2013-07-13</lastmod>
 </sitemap>
</sitemapindex>
I think it is better to avoid sitemap index files if total number of urls is small (less than 10K or so).

WordPress and url priorities in sitemap

It may be a good idea to specify priorities in wordpress for various urls. But we should not keep too many priority values. I would suggest keeping priority 1 for posts and pages and keep it a lower value for tags and categories pages.

Submit sitemap in Google webmaster tools

These are the quick steps to submit a sitemap in Google webmaster tools:

  1. First login to webmaster tools and goto crawl -> sitemaps from left menu links:
    google-webmaster-tools-sitemap-menu-link
  2. The click on add/test sitemap and enter the sitemap location as shown below:
    google-webmaster-tools-sitemap-add-test
  3. You can test the sitemap before adding it. That checks the xml file syntax and also generates a report containing number of urls in the sitemap as shown below:
    google-webmaster-tools-sitemap-test-complete-msggoogle-webmaster-tools-sitemap-test-complete-results
  4. If the sitemap passes the test, then you can submit it and it will appear in sitemap list as shown below:
    google-webmaster-tools-sitemap-list

Reloading sitemap

Sitemap can be reloaded by two ways:

  1. It can be resubmitted thought Google webmaster tools. To do that click on the sitemap in the sitemap list and then on sitemap details page, click on resubmit as shown below:
    google-webmaster-tools-sitemap-details-with-resubmit-link
  2. It can be resubmitted by hitting the following url
    http://www.google.com/webmasters/sitemaps/ping?sitemap=http://sitename.com/sitemap.xml.gz"

 

Suggested posts:

  1. How to display wordpress page list with specific custom field value
  2. WordPress – customize posts per page for tag, category and date archive pages
  3. Verify a web site in google search console (webmaster tools)
  4. Chrome extension tutorial – hello world
  5. Traceroute outcome from Bangalore to AWS Virginia and California
  6. How to setup ssl (https) for your site on Ubuntu Linux
  7. WordPress – query to find term_taxonomy_id from category name
  8. Using camtasia to generate screencast video on your computer
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged SEO, Tutorials, Webmaster
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress