Categories
Archived Coding

Sitemaps? Why?

Why would you want to keep an ugly XML file with references to all your links? How is that necessary in any way? How do you generate it?
I’ll try and answer those questions in an orderly manner, but first I will give you a brief introduction on XML.

Basically, XML (Extensive Markup Language) is a code-language designed to be as easy as possible to read and interpret, for both browsers and search-engine spiders. It uses easy to read tags which, unlike HTML, can be named after anything. <quiz>, <game>, <lol>, etc.
XML files are known to have a very clean structure and they are optimal to use when interacting with search-engines, as they only look at your code and nothing else.

A sitemap is an one-page XML directory consisting of all the various pages within a site. Within each <url> tag is information about the URL of the page, the last modified date, the priority and a host of other things.
How does this help the search engine, then? If you’re coding your homepage in fancy AJAX Javascript, or in other ways have links to pages that aren’t easy for the spider to find, a sitemap is an easy way of getting those pages indexed as well.

Now, writing a sitemap yourself can be a pain, especially if you have hundreds of pages to keep track of. Nowadays, most CMS’s (Content Management Systems) have sitemap-generation included in some form, whether it’s built in or can be added through a modification. If you’re using your own CMS, or you’re manually coding every page by itself you might want to consider checking out Sitemap-generators (search on Google for that). Information on how a sitemap is supposed to look can be found here.

I hope you’ve gotten a clearer picture of what a sitemap is. If you have any more questions feel free to either comment here or contact me.