Now that you know what Google Sitemaps are, how do you create one exactly?
Google sitemaps is based on 6 basic XML tags: <urlset>, <url>, <loc>, <lastmod>, <changefreq>, & <priority>.
Before those of you who are newbies or techno-phobes say “But, I’m not a programmer, I can’t write code!” “XML is too hard” and the like, bear with me and you’ll find this process rather simple.
Here’s a simple example of a XML sitemap for you:
< ?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”http://www.google.com/schemas/sitemap/0.84″>
<url>
<loc>https://www.anthony-yap.com/</loc>
<lastmod>2005-06-04T18:30:17Z</lastmod>
<changefreq>always</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.anthony-yap.com/contact.php</loc>
<lastmod>2005-05-01T18:35:49Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>
</urlset>
Now, let’s understand what each part means.
< ?xml version=”1.0? encoding=”UTF-8??>
Here you specify the file type as XML and the encoding type.
<urlset xmlns=”http://www.google.com/schemas/sitemap/0.84?>
</urlset>
This part defines the XML schema that will be used for this file.
<url>
<loc>https://www.anthony-yap.com/</loc>
</url>
Now, you can specify the exact URL(s) by introducing a ‘url’ tag indicating the start of URLs that you want crawled. You include your specific URL with the ‘loc’ tag. In this case, this is my homepage. Like HTML, you close each open tag with ‘/’ and the name of tag when done.
<lastmod>2005-06-04T18:30:17Z</lastmod>
Here you indicate the last modification time according to the ISO 8601 format.
<changefreq>daily</changefreq>
Now, you define the frequency of change in this file. This gives Google an idea when it should revisit your page again.
<priority>0.2</priority>
Lastly, you establish the individual priority level for indexing of your pages with the ‘priority’ tag. This value will range from 0.0 to 1.o with the higher number being higher priority.
There you have it. An example of a sitemap you can use for your own site.
Now that you have your XML sitemap, how do you feed this information to Google?
First, load your completed XML file to your server. Remember where you uploaded it to.
Now go to Google Sitemap’s homepage and create a free account. Once, you have an account, log in.
Next, click on Add a Sitemap and enter the URL to your own sitemap. All done.
That’s all there is to it. While this code can be considerably more sophisticated, for many of you, it will be sufficient as a head start. Have fun creating and submitting your site pages!